WongKinYiu / yolov7

Implementation of paper - YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors
GNU General Public License v3.0
13.25k stars 4.18k forks source link

ImportError: cannot import name 'non_max_suppression_mask_conf' from 'utils.general' (instance segmentation ipynb) #1038

Open by011 opened 1 year ago

by011 commented 1 year ago

Hello, im a newbie in AI and computer vision. I encountered this problem when trying to run the instance segmentation yolov7 ipynb inside the 'tools' file, but then i couldn't find any relevant function 'non_max_supression_mask_conf' inside all the .py file in utils folder.

Anyone encountered this?

by011 commented 1 year ago

FileNotFoundError: [Errno 2] No such file or directory: 'data/hyp.scratch.mask.yaml'

I couldn't find this file as well. Please help, tq

kamalkannan79 commented 1 year ago

check the u7 branch

by011 commented 1 year ago

check the u7 branch

I found it, but is under "mask" branch. Thanks for your help.

programehr commented 1 year ago

check the u7 branch

Sorry, it seems that the .ipynb file needs the mask branch to run and does not work with u7. I couldn't use it due to dependency on detectron2. How do I run it with the u7 branch?

ohjho commented 1 year ago

for tools/instance.ipynb to work, you need to run it with the mask branch

you also need to install detectron2: pip install 'git+https://github.com/facebookresearch/detectron2.git'

and finally, you need to make a small edit for models/yolo.py (see this comment in #647)