0.2.4 • Published 8 months ago
@annotorious/plugin-segment-anything v0.2.4
Annotorious SegmentAnything Plugin
A fully browser-based smart polygon selection tool for Annotorious based on the sam2-hiera-tiny SegmentAnything model. The basic approach is inspired by this blog post and demo code.

Important: this plugin only supports
@annotorious/openseadragonat this time. Support for plain (JPEG, PNG,...) images is not yet implemented. Get in touch via the forum if you are interested in using this with the@annotorious/annotoriousor@annotorious/reactpackages.
Using with OpenSeadragon
npm install @annotorious/plugin-segment-anythingimport OpenSeadragon from 'openseadragon';
import { createOSDAnnotator } from '@annotorious/openseadragon';
import { mountOpenSeadragonPlugin } from '@annotorious/plugin-segment-anything/openseadragon';
import '@annotorious/openseadragon/annotorious-openseadragon.css';
const viewer = OpenSeadragon({
/** init your viewer **/
});
const anno = createOSDAnnotator(viewer, { /* options */ });
// Initialize the plugin
const plugin = mountOpenSeadragonPlugin(anno);
// This will start initializing the plugin, incl.
// download of the model (this may take a while).
plugin.init();
plugin.on('downloadStart', () => {
console.log('downloading the model - this may take a while');
});
plugin.on('downloadProgress', progress => {
if (progress.complete)
console.log('downloading complete');
});
plugin.on('initialized', () => {
console.log('plugin ready');
});
plugin.on('encodingStart', () => {
console.log('busy - encoding viewport');
});
plugin.on('encodingFinished', () => {
console.log('ready - click to create annotation!');
});0.2.4
8 months ago
0.2.3
9 months ago
0.2.2
9 months ago
0.2.1
9 months ago
0.2.0
9 months ago
0.1.15
10 months ago
0.1.14
10 months ago
0.1.13
10 months ago
0.1.12
10 months ago
0.1.11
10 months ago
0.1.10
10 months ago
0.1.9
10 months ago
0.1.8
10 months ago
0.1.7
10 months ago
0.1.6
10 months ago
0.1.5
10 months ago
0.1.4
10 months ago
0.1.3
10 months ago
0.1.2
10 months ago
0.1.1
10 months ago
0.1.0
10 months ago