fundamentalvision / Deformable-DETR

Deformable DETR: Deformable Transformers for End-to-End Object Detection.
Apache License 2.0
3.25k stars 523 forks source link

Deprecated torchvision version check #132

Open mhruz opened 2 years ago

mhruz commented 2 years ago

https://github.com/fundamentalvision/Deformable-DETR/blob/11169a60c33333af00a4849f1808023eba96a931/util/misc.py#L30

For torchvision version >0.10.0 this check fails and the algorithm determines the version is <0.5

mhruz commented 2 years ago

Proposed solution:

torchvision_version = torchvision.__version__.split(".")
if float(torchvision_version[0]) < 0 and float(torchvision_version[1]) < 5: