Spaces:
Running
Running
Download source/src/config.js from Segizu/rotoscopia-lab: direct link, hf CLI and curl.
- Browser
- Download file 3.69 kB
-
https://huggingface.co/spaces/Segizu/rotoscopia-lab/resolve/main/source/src/config.js
- Command line
-
hf download hf://spaces/Segizu/rotoscopia-lab/source/src/config.js
-
curl -L -o config.js https://huggingface.co/spaces/Segizu/rotoscopia-lab/resolve/main/source/src/config.js
3.69 kB
| // Verified pins (inspected on the Hub 2026-11-09). See README "Versiones fijadas". | |
| export const MODEL_ID = 'onnx-community/sam3-tracker-ONNX'; | |
| export const MODEL_REVISION = '429305c8a5b3de597243d919a07e4e6bdcd00ef7'; | |
| export const BASE_MODEL = 'facebook/sam3'; | |
| export const TRANSFORMERS_VERSION = '4.3.2'; | |
| export const ORT_WEB_VERSION = '1.31.0-dev.20260914-8d85527a0'; // bundled by transformers.js 4.3.2 | |
| // Weight variants offered in the UI. Sizes = exact bytes on the Hub at MODEL_REVISION (LFS sha256 verified). | |
| export const VARIANTS = { | |
| q4f16: { | |
| dtype: 'q4f16', | |
| label: 'q4f16 · 302 MB (recomendado; ideal con WebGPU)', | |
| files: { | |
| 'onnx/vision_encoder_q4f16.onnx': [1307816, '4b96732adab3d7d70ac0964ce540a61fad097fbc10c9b27612f47d676877cefc'], | |
| 'onnx/vision_encoder_q4f16.onnx_data': [295622656, 'd1d60808376dbd48e34cf89feaee708c13abed229f2398ab512149db34fdab07'], | |
| 'onnx/prompt_encoder_mask_decoder_q4f16.onnx': [243598, '6f77d5e2fb6fcb325297734b46cbb951534be08978599856d17c0030b51ea897'], | |
| 'onnx/prompt_encoder_mask_decoder_q4f16.onnx_data': [5121024, '4c330254898062cce1ded5f2208e57b441df443886161af02b492b5a5ae2f6d0'], | |
| }, | |
| }, | |
| q8: { | |
| dtype: 'q8', | |
| label: 'int8 · 539 MB (más rápido en CPU/WASM, más descarga)', | |
| files: { | |
| 'onnx/vision_encoder_quantized.onnx': [1560787, '4446e8b0b1c3b3a08887a1ce98759ae5cef9fc45a61751f4dc42f9dbe76b43c4'], | |
| 'onnx/vision_encoder_quantized.onnx_data': [527113216, 'fd98c9a56d588722ec676f7db67dd7f714ea90bd804b5efc011fd0a3284042e1'], | |
| 'onnx/prompt_encoder_mask_decoder_quantized.onnx': [290416, '5b2d454ee1b050cef5ff3ecf521c32dc475aeb5811e5cca10a6ba9df91d7c3ea'], | |
| 'onnx/prompt_encoder_mask_decoder_quantized.onnx_data': [9776128, 'f6bc264ca57dea733f475327658158e36abbdde4cc53a494a0e1783d2e96ac9d'], | |
| }, | |
| }, | |
| }; | |
| export const variantBytes = (v) => Object.values(VARIANTS[v].files).reduce((s, [b]) => s + b, 0); | |
| // Preset examples (coordinates in original image pixels of the bundled 1280-px copies). | |
| export const EXAMPLES = [ | |
| { | |
| id: 'fruit-bowl', kind: 'image', file: 'example-fruit-bowl.jpg', title: 'Frutero · 1 clic', | |
| points: [{ x: 1125, y: 787, label: 1 }], box: null, | |
| expectBox: [994, 662, 1259, 919], // hand-annotated bbox of the bottom-right tangerine | |
| expect_es: 'se resalta solo la mandarina de abajo a la derecha (~4 % de la imagen)', | |
| }, | |
| { | |
| id: 'desk-laptop', kind: 'image', file: 'example-desk-laptop.jpg', title: 'Escritorio · caja', | |
| points: [], box: [181, 0, 819, 659], | |
| expectBox: [181, 0, 819, 659], | |
| expect_es: 'se resalta el portátil completo (pantalla + teclado), sin la taza ni los lápices (~23 %)', | |
| }, | |
| { | |
| id: 'bicycle-street', kind: 'image', file: 'example-bicycle-street.jpg', title: 'Bicicleta · 3 clics', | |
| points: [{ x: 390, y: 106, label: 1 }, { x: 412, y: 375, label: 1 }, { x: 600, y: 562, label: 1 }], box: null, | |
| expectBox: [200, 85, 625, 825], | |
| expect_es: 'se resalta la bicicleta entera (sillín, manillar, cuadro y rueda delantera; ~17 %)', | |
| }, | |
| ]; | |
| // Synthetic video example (virtual pan over example-desk-laptop.jpg; see scripts/make-example-video.mjs). | |
| export const VIDEO_EXAMPLE = { | |
| id: 'desk-pan', kind: 'video', file: 'example-desk-pan.mp4', title: 'Vídeo sintético · seguir la taza', | |
| // Prompt on the first sampled frame (t=0), in 640×426 frame pixels. | |
| points: [{ x: 604, y: 215, label: 1 }], box: [506, 155, 615, 272], fps: 5, // box + 1 click on the white rim | |
| refBoxOriginal: [828, 208, 968, 358], // same physical box in the 1280-px still, used for ground truth | |
| expect_es: 'la taza de café queda resaltada en los 20 fotogramas mientras la cámara se desplaza', | |
| }; | |