当前位置:网站首页>Runtimeerror: object has no attribute NMS error record when using detectron2

Runtimeerror: object has no attribute NMS error record when using detectron2

2022-06-26 09:10:00 G fruit

Code environment :
python = 3.6
torch = 1.6.0
torchvision = 0.7.0
cuda = 9.2
detectron2 = 0.4

 Insert picture description here

install torch and torchvision command ( come from pytorch Official website V1.6.0

conda install pytorch==1.6.0 torchvision==0.7.0 cudatoolkit=9.2 -c pytorch

install detectron2 Command corresponding to the torch1.6.0 edition ( come from detectron2 Official website installation course

python -m pip install detectron2 -f \
  https://dl.fbaipublicfiles.com/detectron2/wheels/cu92/torch1.6/index.html

Problems encountered

I have problems evaluating the training model , The evaluation function is detectron2.evaluation.inference_on_dataset(model, data_loader, evaluator)

RuntimeError:
object has no attribute nms:
    Filen "/home/scau2/anaconda2/envs/swin-t/lib/python3.6/site-packages/ops/boxes.py", line 40
    ***
    return torch.ops.torchvision.nms(boxes, scores, iou_threshold)
           -------------------------<----HERE
        
'nms' is being compiled since it was called from 'batched_nms'

 Insert picture description here

resolvent

Update code environment :
python = 3.6
torch = 1.7.0
torchvision = 0.8.0
cuda = 9.2
detectron2 = 0.4

install torch and torchvision command ( come from pytorch Official website V1.6.0

conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=9.2 -c pytorch

install detectron2 Command corresponding to the torch1.7.0 edition ( come from detectron2 Official website installation course

python -m pip install detectron2 -f \
  https://dl.fbaipublicfiles.com/detectron2/wheels/cu92/torch1.7/index.html

Problem solving !!!

原网站

版权声明
本文为[G fruit]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202170552524111.html