lyuwenyu / RT-DETR

[CVPR 2024] Official RT-DETR (RTDETR paddle pytorch), Real-Time DEtection TRansformer, DETRs Beat YOLOs on Real-time Object Detection. 🔥 🔥 🔥
Apache License 2.0
2.61k stars 303 forks source link

ModuleNotFoundError: No module named 'cvperception' [RTDETR-V2] #396

Closed mali-afridi closed 3 months ago

mali-afridi commented 3 months ago

Hey, I wanted to try the version2, but I got there is no file named cvperception in rtdetr-pytorchv2/ folder

    from cvperception.core import YAMLConfig
ModuleNotFoundError: No module named 'cvperception'
lyuwenyu commented 3 months ago

which file ?

mali-afridi commented 3 months ago

I am trying to run this file: python references/deploy/rtdetrv2_torch.py You have an import of: from cvperception.core import YAMLConfigin line 11

lyuwenyu commented 3 months ago

relace that line as below

import sys 
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent / '..' / '..'))

from src.core import YAMLConfig
mali-afridi commented 3 months ago

Thanks, works!