ShichengMiao16 / MADet

Mutual-Assistance Learning for Object Detection
Apache License 2.0
19 stars 2 forks source link

Unable to get visualization results with image_demo.py #3

Open zhihuizhang628 opened 6 months ago

zhihuizhang628 commented 6 months ago

torch_version1.6.0,cuda10.1,mmcv_full1.2.7,mmdet2.8.0,

When wishing to obtain an image of the test results, run the command: "CUDA_VISIBLE_DEVICES=1 python demo/image_demo.py demo/images/000751.jpg configs/madet/madet_r50_fpn_1x_ssdd.py work_dirs/ssdd_prebb/madet_r50_fpn_3x_E1planA_noprocess_lr0.0005SGD_ssdd_6/epoch_36.pth --score-thr 0.3 --device cuda:0",

the program is stuck for a long time,no output: “ /opt/conda/envs/MADet/lib/python3.7/site-packages/mmengine/model/utils.py:137: UserWarning: Cannot import torch.fx, merge_dict is a simple function to merge multiple dicts warnings.warn('Cannot import torch.fx, merge_dict is a simple function ' Use load_from_local loader ”

What should I do to solve this problem?

NiceKokusei commented 6 months ago

Thank you for your question. I tried my command like this : "CUDA_VISIBLE_DEVICES=1 \ python demo/image_demo.py \ demo/demo.jpg \ configs/madet/madet_r50_fpn_1x_coco.py \ WORKDIRS/epoch_12.pth", and it runs correctly. Maybe you can check your environment settings and commands to solve your problem.