Skip to content

Fix issue #357: Output MegaDetector category labels instead of numeric IDs - #391

Open
LenaPerry wants to merge 1 commit into
drivendataorg:masterfrom
LenaPerry:issue-357-megadetector-labels
Open

Fix issue #357: Output MegaDetector category labels instead of numeric IDs#391
LenaPerry wants to merge 1 commit into
drivendataorg:masterfrom
LenaPerry:issue-357-megadetector-labels

Conversation

@LenaPerry

Copy link
Copy Markdown

This PR addresses issue #357, ensuring that Zamba outputs the string labels (“animal”, “person”, “vehicle”) for MegaDetector detections instead of the default numeric category IDs (1, 2, 3).

As mentioned in the issue, MegaDetector does output with a detection_categories mapping, but the generate_detections_one_image() output does not include that dictionary. Since Zamba uses the default MD model (MDV5A) and does not override category mappings anywhere, these defaults always apply. Thus I implemented the mapping of 1: animal, 2: person, 3: vehicle within manager.py to change the output the user sees.

I have tested it and it can identify all three categories within images and output the correct label rather than numeric ID.

@LenaPerry LenaPerry changed the title Fix issue #357: Output MegaDetector category labels instead of numeric IDsl Fix issue #357: Output MegaDetector category labels instead of numeric IDs Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant