## environment conda install pytorch==1.8.0 torchvision==0.9.0 torchaudio==0.8.0 cudatoolkit=11.1 -c pytorch -c conda-forge pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.8.0/index.html pip install terminaltables pip install pycocotools ## Filter ng categories to be detected python AOI_select.py --AOI_path AOI-data-path ## Find the white target box in the image and generate the corresponding box and label python AOI_get_box --AOI_path AOI-data-path --coco_path COCO_format_path --classes_file class_file ## convert to COCO dataset format python AOI_to_coco.py --root_dir COCO_format_path --save_path json_file(./train.json) ## Modify parameter file configs/AD_detection/AD_dsxw_test66.py ## single gpu train python tools/train.py configs/AD_detection/AD_dsxw_test66.py --gpus 1 ## distribute train tools/dist_train.sh configs/AD_detection/AD_dsxw_test66.py 8(GPU_number) ## model eval python tools/test.py config_file ckpt_file --eval bbox ## search best threshold python select_threshold.py --config_file config_file --checkpoint_file ckpt_file --images_path testset_path(Contains two folders, OK and ng) --test_batch_size batch_size ## infer score result(Confidence,feature, etc.) python get_score_csv.py --config_file config_file --checkpoint_file ckpt_file --images_path testset_path(unlabel_data) --test_batch_size batch_size --result_path test.csv(Absolute path)