Open leesangjoon1 opened 2 years ago
@leesangjoon1 Maybe it's because you have multiple mmdet code, such as source and pip installed. you can confirm it.
@leesangjoon1 Maybe it's because you have multiple mmdet code, such as source and pip installed. you can confirm it.
How do I unify them to single??
If you installed mmdetection like pip install .
, its code is based on your site-packages
path of your python environment such as /usr/local/lib/python3.7/site-packages/mmdet/
.
If you want to modify the code, you should change the code in the above path or install it again.
Or, if you install it with pip install -e .
, your modified code will be updated immediately. (refer link)
I put the print code in code.
and I change font_size code also but never changed.
What do I do??? What I have to change????
It never changed I don't know how to do it is so stressful
please help me
Thank you:)
Under is my code
from mmdet.apis import init_detector, inference_detector, show_result_pyplot import mmcv
config_file = '/home/sangjoon/realmmdetection/mmdetection/configs/swin/cascade_rcnn_swin_base_patch4_window7_mstrain_480-800_giou_4conv1f_adamw_3x_coco.py' checkpoint_file = '/media/sensor-lab/sensor-lab/sangjoon/20220504_mmdet_swint/white2/best_bbox_mAP_epoch_160.pth'
model = init_detector(config_file, checkpoint_file, device='cuda:0')
img = '/home/sangjoon/realmmdetection/mmdetection/test_result_0504/aedes53_white.jpg' # or img = mmcv.imread(img), which will only load it once result = inference_detector(model, img) show_result_pyplot(model, img, result,score_thr=0.5, out_file='result9.jpg')