facebookresearch / facebookresearch/detectron2
Is the "size_divisiblity" in vit should be "size_divisibility"?
- Dominant language
- Python
- Stars
- 34.7k
- Forks
- 7.9k
- PR merge metrics
- No merged PRs in 30d
Description
I notice that in file "https://github.com/facebookresearch/detectron2/blob/main/detectron2/modeling/backbone/vit.py", in line 471:
"size_divisiblity": self._size_divisibility,
The key is "size_divisiblity".
But in file "https://github.com/facebookresearch/detectron2/blob/main/detectron2/structures/image_list.py", line 96:
if "size_divisibility" in padding_constraints:
The key is "size_divisibility", which means that the key in "vit.py" is missing one “i”,which leads to different padding foramt for images( one is square and the other is not).
I want to know that is this a bug? Or it's just right to pad the image to square in vitdet?
Contributor guide
Research direction
Compare the padding constraint handling at line 471 of detectron2/modeling/backbone/vit.py with the size_divisibility check at line 96 of detectron2/structures/image_list.py. Trace the ViTDet image-padding path and existing tests to determine whether the spelling mismatch is accidental or intentional; done means the key behavior is consistent and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100