MCPcopy Create free account

hub / github.com/bnsreenu/digitalsreeni-image-annotator / functions

Functions1,194 in github.com/bnsreenu/digitalsreeni-image-annotator

↓ 2 callersMethodcompute_split_counts
Return (train, val, test) image counts that sum to n. A subset whose percentage is 0 gets exactly 0 images (this is the fix for the o
src/digitalsreeni_image_annotator/dialogs/dataset_splitter.py:185
↓ 2 callersMethodconvert_to_8bit_rgb
(self, image_array)
src/digitalsreeni_image_annotator/annotator_window.py:369
↓ 2 callersMethodcopy_images
(self, image_list, subset, images_only=False)
src/digitalsreeni_image_annotator/dialogs/dataset_splitter.py:312
↓ 2 callersMethoddelete_class
(self, item=None)
src/digitalsreeni_image_annotator/controllers/class_controller.py:355
↓ 2 callersMethoddetect
Run text-prompted detection. Returns list of dicts: {"class_name": str, "bbox": [x1, y1, x2, y2], "score": float, "label":
src/digitalsreeni_image_annotator/inference/dino_utils.py:141
↓ 2 callersFunctiondisk
(seed, cy, cx)
tests/integration/test_sam_finetuning.py:345
↓ 2 callersMethodexit_editing_mode
(self)
src/digitalsreeni_image_annotator/widgets/image_label.py:1506
↓ 2 callersFunctionexport_sam_dataset
Export a SAM fine-tuning dataset: ``images/`` + ``manifest.json``. The manifest is the authoritative training source — per-instance ``bbox``/
src/digitalsreeni_image_annotator/io/export_formats.py:382
↓ 2 callersMethodgame_over
(self)
src/digitalsreeni_image_annotator/dialogs/snake_game.py:106
↓ 2 callersMethodgenerate_statistics
(self, annotations)
src/digitalsreeni_image_annotator/dialogs/annotation_statistics.py:37
↓ 2 callersMethodget_class_configs
Return list of {name, box_thr, txt_thr, nms_thr}.
src/digitalsreeni_image_annotator/dialogs/dino_phrase_editor.py:112
↓ 2 callersMethodget_dimensions
(self, shape)
src/digitalsreeni_image_annotator/dialogs/stack_to_slices.py:99
↓ 2 callersMethodget_dimensions
(self)
src/digitalsreeni_image_annotator/dialogs/image_patcher.py:45
↓ 2 callersMethodget_notes
(self)
src/digitalsreeni_image_annotator/dialogs/project_details.py:109
↓ 2 callersMethodhas_visible_temp_classes
(self)
src/digitalsreeni_image_annotator/annotator_window.py:507
↓ 2 callersMethodis_class_visible
(self, name: str)
src/digitalsreeni_image_annotator/widgets/canvas_context.py:35
↓ 2 callersFunctionlist_custom_models
``{display_name: path}`` for fine-tuned checkpoints, for the SAM selector.
src/digitalsreeni_image_annotator/training/sam_trainer.py:73
↓ 2 callersMethodload_missing_images
(self, missing_images)
src/digitalsreeni_image_annotator/controllers/project_controller.py:298
↓ 2 callersMethodload_regular_image
(self, image_path)
src/digitalsreeni_image_annotator/controllers/image_controller.py:535
↓ 2 callersFunctionmask_to_point
A single foreground point well inside the mask. Uses the distance transform's argmax so the point sits near the medial axis rather than on an
src/digitalsreeni_image_annotator/training/sam_trainer.py:110
↓ 2 callersFunctionmodels_base_dir
Return the absolute path of the `models/` directory used for ML weights. Resolution strategy (single source of truth used by sam_utils, dino_util
src/digitalsreeni_image_annotator/utils.py:15
↓ 2 callersMethodopen_specific_project
(self, project_file)
src/digitalsreeni_image_annotator/controllers/project_controller.py:113
↓ 2 callersMethodplace_food
(self)
src/digitalsreeni_image_annotator/dialogs/snake_game.py:99
↓ 2 callersMethodpoint_in_polygon
Check if a point is inside a polygon.
src/digitalsreeni_image_annotator/widgets/image_label.py:1514
↓ 2 callersMethodpredict
(self, input_data)
src/digitalsreeni_image_annotator/dialogs/yolo_trainer.py:377
↓ 2 callersFunctionpress_delete
()
tests/integration/test_canvas_selection_controller.py:139
↓ 2 callersMethodprocess_multidimensional_image
( self, image_array, image_path, dimensions=None, force_dimension_dialog=False, axes_hint=None
src/digitalsreeni_image_annotator/controllers/image_controller.py:584
↓ 2 callersMethodprocess_yolo_results
(self, results, image_name)
src/digitalsreeni_image_annotator/controllers/yolo_controller.py:438
↓ 2 callersMethodprompt_load_missing_images
(self, missing_images)
src/digitalsreeni_image_annotator/controllers/project_controller.py:280
↓ 2 callersMethodredo
Step forward one edit. Returns the snapshot to restore, or None.
src/digitalsreeni_image_annotator/controllers/annotation_history.py:80
↓ 2 callersMethodrefresh_model_selector
Register fine-tuned checkpoints and (re)add them to the SAM dropdown.
src/digitalsreeni_image_annotator/controllers/sam_train_controller.py:263
↓ 2 callersMethodrenumber_annotations
(self)
src/digitalsreeni_image_annotator/controllers/annotation_controller.py:720
↓ 2 callersMethodreset_coalesce
Drop any in-progress Detail-% coalescing token (on image switch).
src/digitalsreeni_image_annotator/controllers/annotation_controller.py:343
↓ 2 callersMethodscroll_area
(self)
src/digitalsreeni_image_annotator/widgets/canvas_context.py:50
↓ 2 callersMethodset_active_class
Called when the user selects a different class row.
src/digitalsreeni_image_annotator/dialogs/dino_phrase_editor.py:219
↓ 2 callersMethodset_conf_threshold
(self, conf)
src/digitalsreeni_image_annotator/dialogs/yolo_trainer.py:392
↓ 2 callersMethodshow_info
(self, title, message)
src/digitalsreeni_image_annotator/annotator_window.py:824
↓ 2 callersMethodstep_font_size
(self, delta)
src/digitalsreeni_image_annotator/annotator_window.py:550
↓ 2 callersMethodtoggle_sam_box
(self)
src/digitalsreeni_image_annotator/annotator_window.py:584
↓ 2 callersMethodunload
Free GPU/CPU memory held by the loaded model. Three-step recipe required to actually drop the GPU allocation: 1. Move the underlying
src/digitalsreeni_image_annotator/inference/sam_utils.py:368
↓ 2 callersMethodupdate_annotation_list_with_sorted
(self, sorted_annotations)
src/digitalsreeni_image_annotator/controllers/annotation_controller.py:176
↓ 2 callersMethodupdate_highlighted_annotations
(self)
src/digitalsreeni_image_annotator/annotator_window.py:886
↓ 2 callersMethodupdate_image_list
(self)
src/digitalsreeni_image_annotator/annotator_window.py:292
↓ 2 callersMethodupdate_offset
Update the offset for centered image display.
src/digitalsreeni_image_annotator/widgets/image_label.py:255
↓ 2 callersMethodupdate_patch_info
(self)
src/digitalsreeni_image_annotator/dialogs/image_patcher.py:339
↓ 2 callersMethodupdate_scaled_pixmap
(self)
src/digitalsreeni_image_annotator/widgets/image_label.py:238
↓ 1 callersMethod__init__
(self, shape, file_name, parent=None, default_dimensions=None)
src/digitalsreeni_image_annotator/controllers/image_controller.py:49
↓ 1 callersMethod__init__
(self, main_window)
src/digitalsreeni_image_annotator/controllers/dino_controller.py:83
↓ 1 callersMethod__init__
(self, yolo_trainer, epochs, imgsz)
src/digitalsreeni_image_annotator/controllers/yolo_controller.py:48
↓ 1 callersMethod__init__
(self, trainer: SAMFineTuner, base_model, groups, config)
src/digitalsreeni_image_annotator/controllers/sam_train_controller.py:42
↓ 1 callersMethod__init__
(self)
src/digitalsreeni_image_annotator/inference/sam_utils.py:300
↓ 1 callersMethod__init__
(self, image_loader, specs)
src/digitalsreeni_image_annotator/training/sam_trainer.py:161
↓ 1 callersMethod__init__
(self, shape, file_name, parent=None)
src/digitalsreeni_image_annotator/dialogs/stack_to_slices.py:12
↓ 1 callersMethod__init__
(self, parent=None)
src/digitalsreeni_image_annotator/dialogs/dino_phrase_editor.py:172
↓ 1 callersMethod_apply_freeze
(net, freeze_image_encoder: bool)
src/digitalsreeni_image_annotator/training/sam_trainer.py:244
↓ 1 callersFunction_arm_canvas
Set up the image label for #40-style handle edits + select the mask.
tests/integration/test_annotation_table.py:44
↓ 1 callersFunction_bbox_area
(bbox: list)
src/digitalsreeni_image_annotator/inference/sam_utils.py:143
↓ 1 callersMethod_build_predictor
Return a ready ``SAM2Predictor`` for ``base_model`` (a registry name like ``"SAM 2 tiny"`` or a path to a ``.pt``). Forces predictor
src/digitalsreeni_image_annotator/training/sam_trainer.py:202
↓ 1 callersMethod_build_ui
(self)
src/digitalsreeni_image_annotator/dialogs/dino_merge_dialog.py:65
↓ 1 callersFunction_check_points
(contour: list, positive: list, negative: list)
src/digitalsreeni_image_annotator/inference/sam_utils.py:147
↓ 1 callersFunction_check_torch_then_qt
Production import order: torch first, then QApplication. This is what main.py does (see ADR-017).
tools/check_pyqt6_torch_coexistence.py:69
↓ 1 callersFunction_circle
(cx, cy, r, n)
tests/integration/test_annotation_history.py:44
↓ 1 callersFunction_circle
(cx, cy, r, n)
tests/integration/test_annotation_table.py:54
↓ 1 callersMethod_clamp_edited_shape
Clamp a just-edited shape into the image. A move slides the intact shape back inside (size/shape preserving); a resize trims to the border.
src/digitalsreeni_image_annotator/widgets/image_label.py:1354
↓ 1 callersMethod_collect_dino_batch_work_items
Return a flat ``[(name, QImage), …]`` list for batch DINO. Regular images are loaded from disk via PIL → QImage. Multi-dim images con
src/digitalsreeni_image_annotator/controllers/dino_controller.py:453
↓ 1 callersMethod_connect_image_label_signals
Wire ImageLabel events to controller slots. ImageLabel does not hold a main_window reference any more — every write path is a Qt signa
src/digitalsreeni_image_annotator/annotator_window.py:179
↓ 1 callersMethod_device_label
``cuda:0 (NVIDIA GeForce RTX 4070)`` — make it obvious the GPU is in use (a bare ``cuda:0`` reads to users like the GPU wasn't detected).
src/digitalsreeni_image_annotator/training/sam_trainer.py:231
↓ 1 callersMethod_draw_selection_overlay
Mark a selected annotation the way the sibling open-garden-planner app does: a dashed selection-blue bounding box plus bright square h
src/digitalsreeni_image_annotator/widgets/image_label.py:638
↓ 1 callersMethod_gpu_gate
Warn (and let the user back out) when no usable GPU is present.
src/digitalsreeni_image_annotator/controllers/sam_train_controller.py:202
↓ 1 callersMethod_load_model_blocking
Load (cache) the Grounding DINO model for ``model_path``.
src/digitalsreeni_image_annotator/inference/dino_utils.py:86
↓ 1 callersMethod_log_device
(self)
src/digitalsreeni_image_annotator/inference/sam_utils.py:357
↓ 1 callersMethod_make_detail_spin
A per-row 1..100 Detail % spinbox (100 = raw). Disabled for annotations with no polygon to simplify (bbox-only imports).
src/digitalsreeni_image_annotator/controllers/annotation_controller.py:99
↓ 1 callersMethod_navigate_to_image_or_slice
Switch the UI to a regular image or a slice by name. Returns True if a match was found and the switch was issued. Used by batch-revie
src/digitalsreeni_image_annotator/controllers/dino_controller.py:579
↓ 1 callersMethod_on_dino_model_changed
Selection → ready state. Downloads happen lazily on first Detect.
src/digitalsreeni_image_annotator/controllers/dino_controller.py:94
↓ 1 callersFunction_parse_arch_list
Extract numeric sm values from e.g. ["sm_70", "sm_80", "compute_90"].
src/digitalsreeni_image_annotator/core/torch_utils.py:88
↓ 1 callersFunction_predicted_bbox_area_ratio
(pred_contour: list, user_bbox: list)
src/digitalsreeni_image_annotator/inference/sam_utils.py:158
↓ 1 callersMethod_prompt_kwargs
(prompt_type: str, mask: np.ndarray, bbox)
src/digitalsreeni_image_annotator/training/sam_trainer.py:403
↓ 1 callersMethod_rect_from_points
(self)
src/digitalsreeni_image_annotator/widgets/tools/rectangle_tool.py:43
↓ 1 callersMethod_rename_phrase
Prompt for a new phrase text and replace the row. Mirrors the class-rename flow in annotator_window: validate non-empty, strip, reject
src/digitalsreeni_image_annotator/dialogs/dino_phrase_editor.py:295
↓ 1 callersFunction_resolve
()
src/digitalsreeni_image_annotator/core/torch_utils.py:32
↓ 1 callersMethod_resolve_device
Pick CUDA if available and usable; honour DINO_DEVICE override.
src/digitalsreeni_image_annotator/inference/dino_utils.py:75
↓ 1 callersMethod_resolve_model_file
(self, model_name: str)
src/digitalsreeni_image_annotator/inference/sam_utils.py:315
↓ 1 callersMethod_run_for_class
Single DINO inference for one class. Returns (boxes, scores, labels).
src/digitalsreeni_image_annotator/inference/dino_utils.py:251
↓ 1 callersMethod_save_and_verify
Save fine-tuned weights as ``{"model": state_dict}`` and prove they reload through ``SAM(out_path)``. Ultralytics' ``_load_checkpoint
src/digitalsreeni_image_annotator/training/sam_trainer.py:411
↓ 1 callersMethod_scale_segmentation
Map every vertex from the old bounding box to the new one (affine scale), so resizing the box scales the whole polygon proportionally.
src/digitalsreeni_image_annotator/widgets/image_label.py:1248
↓ 1 callersFunction_section_header
(text)
src/digitalsreeni_image_annotator/ui/sidebar.py:36
↓ 1 callersFunction_seg
(x0, y0, side, number)
tests/integration/test_bbox_edit_controller.py:35
↓ 1 callersMethod_set_image
Preprocess ``image`` and compute encoder features into the predictor. Sets ``pred.batch`` explicitly so ``_prepare_prompts`` maps bbox/point
src/digitalsreeni_image_annotator/training/sam_trainer.py:379
↓ 1 callersFunction_specs_for
Flatten ``{class: [ann, ...]}`` into raw instance specs the :class:`SampleGroup` rasterises lazily.
src/digitalsreeni_image_annotator/training/sam_dataset.py:22
↓ 1 callersMethod_start
(self, pos)
src/digitalsreeni_image_annotator/widgets/tools/eraser_tool.py:132
↓ 1 callersMethod_start
(self, pos)
src/digitalsreeni_image_annotator/widgets/tools/paint_tool.py:106
↓ 1 callersMethod_store_dino_batch_results
Store results for batch review mode.
src/digitalsreeni_image_annotator/controllers/dino_controller.py:540
↓ 1 callersMethod_update_selection_drag
Grow the rubber band once the drag clears the click threshold.
src/digitalsreeni_image_annotator/widgets/image_label.py:1143
↓ 1 callersMethodaccept_dino_results
Accept current temp_annotations (called from keyPressEvent).
src/digitalsreeni_image_annotator/controllers/dino_controller.py:638
↓ 1 callersMethodaccept_sam_prediction
(self)
src/digitalsreeni_image_annotator/annotator_window.py:360
↓ 1 callersMethodaccept_temp_annotations
(self)
src/digitalsreeni_image_annotator/widgets/image_label.py:374
↓ 1 callersMethodaccept_visible_temp_classes
(self)
src/digitalsreeni_image_annotator/annotator_window.py:1181
↓ 1 callersMethodadd_temp_classes
(self, temp_annotations)
src/digitalsreeni_image_annotator/controllers/dino_controller.py:694
↓ 1 callersMethodadjust_zoom_to_fit
(self)
src/digitalsreeni_image_annotator/annotator_window.py:392
↓ 1 callersMethodapply_font_size
(self)
src/digitalsreeni_image_annotator/dialogs/help_window.py:29
← previousnext →201–300 of 1,194, ranked by callers