MCPcopy Create free account

hub / github.com/abhishekkrthakur/sam3-playground / functions

Functions45 in github.com/abhishekkrthakur/sam3-playground

↓ 7 callersFunctionshowEmptyState
(el, show)
src/sam3/scripts/app.js:102
↓ 6 callersFunctionrenderBoxes
(currentDrag = null)
src/sam3/scripts/app.js:244
↓ 6 callersFunctionsetStatus
(message, isError = false)
src/sam3/scripts/app.js:69
↓ 5 callersFunction_encode_image
Convert an image to base64 for in-browser rendering.
src/sam3/ui.py:23
↓ 4 callersFunctionresetResultState
()
src/sam3/scripts/app.js:120
↓ 3 callersFunction_generate_colors
Generate deterministic colors so masks and boxes share a palette.
src/sam3/utils.py:8
↓ 3 callersFunctionhideContextMenu
()
src/sam3/scripts/app.js:329
↓ 3 callersFunctionnormalizedPoint
(event)
src/sam3/scripts/app.js:235
↓ 2 callersFunctionclamp
(value, min = 0, max = 1)
src/sam3/scripts/app.js:62
↓ 2 callersFunctiondrawBox
(box, isPending = false)
src/sam3/scripts/app.js:249
↓ 2 callersFunctiondrawResultBoxes
()
src/sam3/scripts/app.js:388
↓ 2 callersFunctionrenderBoxList
()
src/sam3/scripts/app.js:359
↓ 2 callersFunctionresetBoxes
()
src/sam3/scripts/app.js:133
↓ 2 callersFunctionsetActiveTab
(id)
src/sam3/scripts/app.js:499
↓ 2 callersFunctionsetLoading
( isLoading, { message = "Running SAM3 Model...", button = submitBtn, idleText = "Generate Seg
src/sam3/scripts/app.js:75
↓ 2 callersFunctionsyncCanvasSize
()
src/sam3/scripts/app.js:159
↓ 2 callersFunctionsyncResultCanvas
()
src/sam3/scripts/app.js:168
↓ 2 callersFunctiontoggleUploadState
(hasImage)
src/sam3/scripts/app.js:127
↓ 1 callersFunction_parse_boxes_payload
Parse boxes/labels JSON payload from the incoming request.
src/sam3/ui.py:31
↓ 1 callersFunction_resolve_device
Pick the best available device for inference.
src/sam3/main.py:10
↓ 1 callersFunction_serialize_individual_masks
Encode each predicted mask separately for client-side interaction.
src/sam3/ui.py:80
↓ 1 callersFunction_serialize_mask_image
Merge all predicted masks into a single binary mask and encode to base64.
src/sam3/ui.py:53
↓ 1 callersFunction_to_xyxy
Normalize incoming boxes to xyxy pixel coords.
src/sam3/utils.py:34
↓ 1 callersFunctionapplyResult
(data)
src/sam3/scripts/app.js:419
↓ 1 callersFunctioncancelPendingBox
()
src/sam3/scripts/app.js:334
↓ 1 callersFunctionclearMaskPreview
()
src/sam3/scripts/app.js:107
↓ 1 callersFunctionclearResultCanvas
()
src/sam3/scripts/app.js:114
↓ 1 callersFunctionloadImage
(file)
src/sam3/scripts/app.js:176
↓ 1 callersFunctionload_model
Load and cache the SAM3 model and processor.
src/sam3/main.py:20
↓ 1 callersFunctionoverlay_boxes
Draw bounding boxes that match the mask color palette.
src/sam3/utils.py:28
↓ 1 callersFunctionoverlay_masks
(image, masks, colors=None)
src/sam3/utils.py:14
↓ 1 callersFunctionrun_inference
Run SAM3 instance segmentation for a prompt and thresholds.
src/sam3/main.py:28
↓ 1 callersFunctionshowContextMenu
(x, y)
src/sam3/scripts/app.js:316
↓ 1 callersFunctionupdateSliderLabels
()
src/sam3/scripts/app.js:64
Function_process_image
Run inference and return serialized results.
src/sam3/ui.py:113
FunctioncloseModal
()
src/sam3/scripts/app.js:225
FunctionendDraw
(e)
src/sam3/scripts/app.js:298
Functionhealthcheck
Simple health endpoint for uptime checks.
src/sam3/ui.py:191
Functionhome
Render the playground UI.
src/sam3/ui.py:156
FunctionmoveDraw
(e)
src/sam3/scripts/app.js:292
FunctionopenModal
()
src/sam3/scripts/app.js:219
Functionprocess_image
Handle image uploads and return segmentation overlays.
src/sam3/ui.py:167
FunctionresetImage
()
src/sam3/scripts/app.js:139
FunctionstartDraw
(e)
src/sam3/scripts/app.js:284
Functionwarm_models
Load SAM3 model into memory on startup; fail fast if unavailable.
src/sam3/ui.py:161