FairMOT: On Windows 10 I get ModuleNotFoundError: No module named '_ext'
My lib versions
python 3.6.8
torch==1.4.0
torchsummary==1.5.1
torchvision==0.5.0
I got everything else installed but I get this error on Windows 10 when running demo.py
(pytorch) E:\Documents\Projects\FairMOT\src>python demo.py mot --load_model ../models/hrnetv2_w32_imagenet_pretrained.pth
Traceback (most recent call last):
File "demo.py", line 14, in <module>
from track import eval_seq
File "E:\Documents\Projects\FairMOT\src\track.py", line 15, in <module>
from tracker.multitracker import JDETracker
File "E:\Documents\Projects\FairMOT\src\lib\tracker\multitracker.py", line 12, in <module>
from lib.models.model import create_model, load_model
File "E:\Documents\Projects\FairMOT\src\lib\models\model.py", line 11, in <module>
from .networks.pose_dla_dcn import get_pose_net as get_dla_dcn
File "E:\Documents\Projects\FairMOT\src\lib\models\networks\pose_dla_dcn.py", line 16, in <module>
from .DCNv2.dcn_v2 import DCN
File "E:\Documents\Projects\FairMOT\src\lib\models\networks\DCNv2\dcn_v2.py", line 13, in <module>
import _ext as _backend
ModuleNotFoundError: No module named '_ext'
Though I have the .ext and .lib files copied in the same folder as the script
Also the python setup.py build develop
didn’t succeed with the attached error
out.txt
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 70 (12 by maintainers)
Finally I got the results
with the following command line
python demo.py mot --load_model ../models/all_hrnet_v2_w18.pth --input-video ../videos/mot16-03.mp4 --output-root ../results --arch hrnet_18 --reid_dim 128 --conf_thres 0.4
Thank you @ifzhang and @zubovskiii98 for helping out with this As for video output please let me know where to reach you @ifzhang my email is
inbox at zubairahmed dot net
closing issueOK, I will upload some pretrained models of ResNet and HRNet and write some tutorials. When using ResNet and HRNet, you do not need to run build DCNv2.
It was not very wise to discuss my issue in Windows 10 topic, because I am using Ubuntu 18
But in any case if you have followed the manual correctly, by doing:
And having right CUDA, everything should be fine, except…
I had an issue with
mkdir_if_missing()
, which is essentiallyos.makedirs(dir)
. It could not create a resulting directory, because of permissions error. Therefore, I have created the folders likevideos
,results
, etc in root directory. (if not having ones) Then, I had to change following/src/track.py
->def main()
Hope it helps
hi, you can try
python setup.py install develop