[discussion] [wip] Move/adopt to torchvision frequent utils from detectron2 (and potentially other frameworks)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Description
🚀 The feature
I propose to open the discussion and collect in this issue some discrepancies or duplicate functionalities I found between detectron2 and torchvision.
detecton2 / mmdet / kornia are now quite old and established, so one can discuss of adopting well-designed / widely-used util functions and Modules from these frameworks to torchvision, so that there's less reimplementation and more established idioms.
- move CUDA and C++ ops from detectron2: https://github.com/facebookresearch/detectron2/tree/main/detectron2/layers/csrc: ROIAlignRotated+box_iou_rotated+nms_rotated, deformable convolutions (already moved to torchvision?). Moving them to torchvision would also allow to have a workable python-only version of detectron2
- fast evaluators from detectron2: coco format evaluator / lvis evaluator?
- paste_masks_in_image - already a version exists in torchvision but with slightly different API; and some other mask_ops?
- simple colormap generation
- instance / box visualizer: https://github.com/facebookresearch/detectron2/blob/main/detectron2/utils/visualizer.py
- exif parser / apply exif orientation: https://github.com/facebookresearch/detectron2/blob/cbbc1ce26473cb2a5cc8f58e8ada9ae14cb41052/detectron2/data/detection_utils.py#L119
- focal loss from fvcore https://github.com/facebookresearch/fvcore/tree/main/fvcore/nn and other utils from fvcore?
Motivation, pitch
N/A
Alternatives
No response
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
This is a broad discussion/WIP issue with no single target file or test. Start by comparing the listed detectron2 paths, fvcore utilities, and existing torchvision APIs; the work is done only after a specific utility or module is selected, scoped, and its expected behavior and tests are agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision, machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100