linghu8812 / tensorrt_inference

699 stars 205 forks source link

Retinaface: No module named 'rcnn.cython.bbox' #118

Closed cyrusbehr closed 2 years ago

cyrusbehr commented 2 years ago

I am following the instructions here. I've downloaded the insightface repo (commit hash 3cbd9f74fae214fdf95615aeb489c54f83f3297f). I copy over export_onnx.py to insightface/detection/retinaface. I then try running python3 export_onnx.py --prefix ./model/mnet.25 at which point I get the following crash:

Traceback (most recent call last):
  File "export_onnx.py", line 3, in <module>
    from retinaface import RetinaFace
  File "/home/cyrus/work/repos/insightface/detection/retinaface/retinaface.py", line 13, in <module>
    from rcnn.processing.bbox_transform import clip_boxes
  File "/home/cyrus/work/repos/insightface/detection/retinaface/rcnn/processing/bbox_transform.py", line 2, in <module>
    from ..cython.bbox import bbox_overlaps_cython
ModuleNotFoundError: No module named 'rcnn.cython.bbox'

Please help. Also it would be very helpful if you uploaded the pre-converted onnx models to google drive

cyrusbehr commented 2 years ago

I was able to solve this issue, looks like I needed to run make in the insightface/detection/retinaface directory before I could run the python conversion script.