Our model and code are based on CBNetV2 of UniverseNet
git clone https://github.com/haiminh2001/Train4Ever.git
pip install -U openmim
mim install mmcv-full
cd Train4Ever
pip install -v -e .
Change permission to train
chmod 777 ./tools/dist_train.sh
python preprocessing.py --input_path <path_to_input_data> --output_path ./data/TrainImagesPNG
python genLabelCocoFormat.py --input_labels_path <path_to_input_label_images> --output_folder_path ./data
To save time you can download our preprocessed data and generated annotation file here
Pretrain model CBNetV2 on dataset COCO here, put file weight pretrain at folder pretrains
After the download is complete you set up folder as picture below and put the corresponding dataset
tools/dist_train.sh configs/cbnet/mask_rcnn_cbv2_swin_tiny_patch4_window7_mstrain_780-1100_adamw_3x_coco.py 1
You can change file config here
checkpoint our model here
python Infer.py --input_path <path_to_input_data> --config_path <path_to_input_config> --ckpt_path <path_to_input_ckpt> --output_path <path_to_output>