Repository Analysis

wkentaro/labelme

Image annotation with Python. Supports polygon, rectangle, circle, line, point, and AI-assisted annotation.

9.5 Low AI signal View on GitHub
9.5
Adjusted Score
9.5
Raw Score
100%
Time Factor
2026-05-27
Last Push
15,918
Stars
Python
Language
40,787
Lines of Code
167
Files
377
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 4MEDIUM 1LOW 372

Pattern Findings

377 matches across 6 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers254 hits · 254 pts
SeverityFileLineSnippet
LOWtests/unit/_shape_test.py13def _make_axis_aligned_oriented_rectangle() -> Shape:
LOWtests/unit/_shape_test.py21def test_rotate_oriented_rectangle_around_origin() -> None:
LOWtests/unit/_shape_test.py35def test_rotate_non_oriented_rectangle_raises() -> None:
LOWtests/unit/_shape_test.py49def test_nearest_vertex_index_returns_none_for_mask() -> None:
LOWtests/unit/load_image_file_test.py23def test_tiff_without_alpha_encoded_as_jpeg(tmp_path: Path) -> None:
LOWtests/unit/load_image_file_test.py29def test_tiff_with_alpha_encoded_as_png(tmp_path: Path) -> None:
LOWtests/unit/load_image_file_test.py35def test_jpeg_returns_raw_bytes(tmp_path: Path) -> None:
LOWtests/unit/load_image_file_test.py41def test_png_returns_raw_bytes(tmp_path: Path) -> None:
LOWtests/unit/load_image_file_test.py70def test_constant_value_tiff_returns_black(tmp_path: Path) -> None:
LOWtests/unit/load_image_file_test.py81def test_two_band_tiff_falls_back_to_first_band(tmp_path: Path) -> None:
LOWtests/unit/_label_file_test.py88def test_read_label_file_returns_label_data(data_path: Path) -> None:
LOWtests/unit/_label_file_test.py98def test_read_label_file_extracts_other_data(
LOWtests/unit/_label_file_test.py129def test_read_label_file_raises_read_error_on_malformed(
LOWtests/unit/_label_file_test.py142def test_write_label_file_round_trips(data_path: Path, tmp_path: Path) -> None:
LOWtests/unit/_label_file_test.py179def test_write_label_file_rejects_reserved_other_data_key(
LOWtests/unit/_label_file_test.py193def test_write_label_file_raises_on_dimension_mismatch(
LOWtests/unit/_label_file_test.py209def test_write_label_file_raises_write_error_on_io_failure(tmp_path: Path) -> None:
LOWtests/unit/config_test.py13def test_get_user_config_file_creates_sparse(
LOWtests/unit/config_test.py24def test_get_user_config_file_does_not_overwrite(
LOWtests/unit/config_test.py35def test_get_user_config_file_skip_creation(
LOWtests/unit/config_test.py44def test_migrate_store_data_to_with_image_data(tmp_path: Path, old_value: bool) -> None:
LOWtests/unit/config_test.py62def test_migrate_ai_model_name(input_name: str, expected_name: str) -> None:
LOWtests/unit/config_test.py85def test_migrate_polygon_shortcut_to_shape(old_key: str, new_key: str) -> None:
LOWtests/unit/config_test.py92def test_migrate_polygon_shortcuts_no_shortcuts_key() -> None:
LOWtests/unit/config_test.py98def test_migrate_polygon_shortcut_skips_when_new_key_exists() -> None:
LOWtests/unit/utils/qt_test.py45def test_project_point_on_perpendicular_line(
LOWtests/unit/utils/qt_test.py61def test_project_point_on_line(point: QPointF, expected: tuple[float, float]) -> None:
LOWtests/unit/utils/shape_test.py31def test_shape_to_mask_oriented_rectangle_marks_inside_pixels() -> None:
LOWtests/unit/utils/shape_test.py45def test_shape_to_mask_rectangle_reversed_coords() -> None:
LOWtests/unit/utils/image_test.py26def test_img_data_to_png_data() -> None:
LOWtests/unit/_automation/_shape_builders_test.py13def test_shapes_from_detections_rectangle_uses_bbox() -> None:
LOWtests/unit/_automation/_shape_builders_test.py24def test_shapes_from_detections_rectangle_without_bbox_is_dropped() -> None:
LOWtests/unit/_automation/_shape_builders_test.py33def test_shapes_from_detections_circle_with_mask_uses_centroid_and_area() -> None:
LOWtests/unit/_automation/_shape_builders_test.py54def test_shapes_from_detections_circle_without_mask_falls_back_to_inscribed() -> None:
LOWtests/unit/_automation/_shape_builders_test.py67def test_shapes_from_detections_oriented_rectangle_with_mask_uses_min_area_rect() -> (
LOWtests/unit/_automation/_shape_builders_test.py89def test_shapes_from_detections_oriented_rectangle_without_mask_falls_back() -> None:
LOWtests/unit/_automation/_shape_builders_test.py101def test_shapes_from_detections_oriented_rectangle_with_rotated_mask(
LOWtests/unit/_automation/_shape_builders_test.py125def test_shapes_from_detections_oriented_rectangle_with_square_mask() -> None:
LOWtests/unit/_automation/_shape_builders_test.py139def test_shapes_from_detections_oriented_rectangle_square_mask_no_bbox() -> None:
LOWtests/unit/_automation/_shape_builders_test.py153def test_shapes_from_detections_mask_drops_empty_mask() -> None:
LOWtests/unit/_automation/_suppression_test.py147def test_redundant_empty_detections() -> None:
LOWtests/unit/_automation/_suppression_test.py151def test_redundant_drops_duplicate_bbox_only_detections() -> None:
LOWtests/unit/_automation/_suppression_test.py160def test_redundant_passes_through_detections_without_bbox() -> None:
LOWtests/unit/_automation/_suppression_test.py168def test_redundant_raises_on_mask_shape_mismatch() -> None:
LOWtests/unit/_automation/_suppression_test.py178def test_redundant_rejects_mixed_mask_and_bbox_only() -> None:
LOWtests/unit/_automation/_suppression_test.py29def test_redundant_drops_duplicate_mask_keeps_first(
LOWtests/unit/_automation/_suppression_test.py40def test_redundant_keeps_first_when_descriptions_differ() -> None:
LOWtests/unit/_automation/_suppression_test.py53def test_redundant_keeps_only_first_among_three_duplicates(
LOWtests/unit/_automation/_suppression_test.py67def test_redundant_keeps_disjoint_masks() -> None:
LOWtests/unit/_automation/_suppression_test.py82def test_redundant_drops_mask_contained_in_larger_mask() -> None:
LOWtests/unit/_automation/_suppression_test.py99def test_redundant_keeps_partial_overlap_below_containment_threshold() -> None:
LOWtests/unit/_automation/_suppression_test.py118def test_redundant_keeps_triangles_sharing_bbox() -> None:
LOWtests/unit/_automation/_suppression_test.py136def test_redundant_does_not_suppress_across_labels(
LOWtests/unit/_automation/_suppression_test.py189def test_overlapping_drops_polygon_detection_overlapping_existing_polygon() -> None:
LOWtests/unit/_automation/_suppression_test.py205def test_overlapping_keeps_when_iou_below_threshold() -> None:
LOWtests/unit/_automation/_suppression_test.py220def test_overlapping_uses_mask_iou_not_bbox_iou() -> None:
LOWtests/unit/_automation/_suppression_test.py239def test_overlapping_empty_detections() -> None:
LOWtests/unit/_automation/_suppression_test.py252def test_overlapping_no_existing_shapes_passes_through() -> None:
LOWtests/unit/_automation/_suppression_test.py263def test_overlapping_passes_through_detection_without_bbox() -> None:
LOWtests/unit/_automation/_suppression_test.py277def test_overlapping_drops_detection_engulfing_smaller_existing_shape() -> None:
194 more matches not shown…
Unused Imports106 hits · 105 pts
SeverityFileLineSnippet
LOWtests/conftest.py1
LOWtests/unit/_shape_test.py1
LOWtests/unit/load_image_file_test.py1
LOWtests/unit/_label_file_test.py1
LOWtests/unit/config_test.py1
LOWtests/unit/utils/qt_test.py1
LOWtests/unit/utils/shape_test.py1
LOWtests/unit/utils/util.py1
LOWtests/unit/utils/image_test.py1
LOWtests/unit/_automation/conftest.py1
LOWtests/unit/_automation/_shape_builders_test.py1
LOWtests/unit/_automation/_suppression_test.py1
LOWtests/unit/_automation/_geometry_test.py1
LOWtests/unit/widgets/canvas_test.py1
LOWtests/e2e/smoke_test.py1
LOWtests/e2e/file_loading_test.py1
LOWtests/e2e/conftest.py1
LOWtests/e2e/save_format_contract_test.py1
LOWtests/e2e/navigation_test.py1
LOWtests/e2e/annotation_test.py1
LOWtests/e2e/file_operations_test.py1
LOWtests/e2e/last_label_and_restore_test.py1
LOWtests/e2e/auto_save_test.py1
LOWtests/e2e/oriented_rectangle_test.py1
LOWtests/e2e/visibility_test.py1
LOWtests/e2e/file_dialog_actions_test.py1
LOWtests/e2e/drag_and_drop_test.py1
LOWtests/e2e/shape_editing_test.py1
LOWtests/e2e/zoom_test.py1
LOWtests/e2e/label_dialog_flags_test.py1
LOWtests/e2e/label_dialog_validation_test.py1
LOWtests/e2e/canvas_paint_snapshot_test.py1
LOWtests/e2e/status_bar_messages_test.py1
LOWtests/e2e/window_geometry_persistence_test.py1
LOWtests/e2e/canvas_interaction_test.py1
LOWtests/e2e/brightness_contrast_test.py1
LOWtests/e2e/label_list_canvas_selection_test.py1
LOWtests/e2e/unsaved_changes_dialog_test.py1
LOWtests/e2e/config_test.py1
LOWtests/e2e/middle_drag_scroll_test.py1
LOWlabelme/__init__.py14
LOWlabelme/__init__.py16
LOWlabelme/__init__.py17
LOWlabelme/app.py1
LOWlabelme/_shape.py1
LOWlabelme/_shape_clipboard.py1
LOWlabelme/__main__.py1
LOWlabelme/_label_file.py1
LOWlabelme/config/__init__.py1
LOWlabelme/utils/qt.py1
LOWlabelme/utils/__init__.py6
LOWlabelme/utils/__init__.py7
LOWlabelme/utils/__init__.py8
LOWlabelme/utils/__init__.py9
LOWlabelme/utils/__init__.py10
LOWlabelme/utils/__init__.py11
LOWlabelme/utils/__init__.py12
LOWlabelme/utils/__init__.py13
LOWlabelme/utils/__init__.py14
LOWlabelme/utils/__init__.py16
46 more matches not shown…
Cross-Language Confusion4 hits · 18 pts
SeverityFileLineSnippet
HIGHlabelme/app.py2113 logger.warning("image is null, cannot paint canvas")
HIGHlabelme/_shape.py443 if path_vertices.length() > 0:
HIGHlabelme/_shape.py451 if path_rotation_vertices.length() > 0:
HIGHlabelme/_shape.py462 if path_orientation_arrow.length() > 0:
Deep Nesting10 hits · 8 pts
SeverityFileLineSnippet
LOWlabelme/app.py2594
LOWlabelme/app.py1430
LOWlabelme/_shape.py564
LOWlabelme/utils/shape.py17
LOWlabelme/utils/image.py73
LOWlabelme/widgets/canvas.py543
LOWlabelme/widgets/canvas.py810
LOWlabelme/widgets/canvas.py1485
LOWlabelme/widgets/canvas.py1508
LOWexamples/instance_segmentation/labelme2coco.py55
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMlabelme/widgets/canvas.py986 # a splitter or a test harness).
Excessive Try-Catch Wrapping2 hits · 2 pts
SeverityFileLineSnippet
LOWlabelme/config/__init__.py116 except Exception:
LOWlabelme/widgets/download.py64 except Exception as e: