Skip to content

Fix MMDetection COCO crowd filtering - #3268

Open
dajiaohuang wants to merge 1 commit into
activeloopai:mainfrom
dajiaohuang:fix-mmdet-coco-crowd-filter-3264
Open

dajiaohuang wants to merge 1 commit into
activeloopai:mainfrom
dajiaohuang:fix-mmdet-coco-crowd-filter-3264

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Oct 7, 2026 •

Copy link
Copy Markdown

Impact: Bug fix. ### Description: Fixes #3256. The crowd filter now iterates the annotation list produced by both getAnnIds paths. This preserves the existing filters and returns matching annotation IDs instead of calling values on a list. Validation: git diff --check passed. No tests or builds were run per assignment. ### Things to be aware of: The fix is scoped to the reported call path and preserves the existing API. ### Things to worry about: Tests and runtime validation were not run. ### Additional Context: No additional dependency or migration changes.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed annotation filtering when retrieving annotation IDs for COCO data. Crowd annotations are now handled correctly, so annotation lookups return the expected results. This improves the accuracy of results for workflows that rely on retrieving annotations by ID, without changing other annotation retrieval behavior.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6f6571d9-2ddd-486c-adbf-958c72f0ab4a
📥 Commits

Reviewing files that changed from the base of the PR and between f432041 and 5985776.

📒 Files selected for processing (1)
  • python/deeplake/integrations/mmdet/mmdet_utils_.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

_COCO.getAnnIds now filters crowd annotations by iterating over the annotation list instead of calling .values() on it.

Changes

COCO crowd filtering

Layer / File(s) Summary
Filter annotations from the list
python/deeplake/integrations/mmdet/mmdet_utils_.py
getAnnIds reads each annotation’s id and iscrowd fields from the list. This replaces iteration over anns.values().

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 59857

The reported crowd-filter failure is fixed for both getAnnIds paths, with no additional concrete merge risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: fixing MMDetection COCO crowd filtering.
Description check ✅ Passed The description covers the bug fix, linked issue, technical change, scope, validation status, concerns, and context. It does not use the template checkbox format, but it clearly identifies the change …
Linked Issues check ✅ Passed Issue #3256 requires crowd filtering to work when getAnnIds receives either image IDs or no image IDs. The PR changes _COCO.getAnnIds to iterate the annotation list directly instead of calling `.v…
Out of Scope Changes check ✅ Passed The reported change is limited to the crowd-filtering operation in python/deeplake/integrations/mmdet/mmdet_utils_.py. The provided change summary shows one changed line and no public declaration, d…
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the list with care,
Finds crowd flags and IDs there.
No .values() call to trip,
The annotations pass the filter’s sweep.
Then hops away with ears held high.

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

[BUG] MMDetection COCO crowd filtering calls values() on a list

1 participant