3rd Anti-UAV Model and Dataset
This project provides a baseline model and evaluation code for track1 and track2 for CVPR23 3rd Anti-UAV workshop.
News
Test Set can be downloaded with following code:
from modelscope.msdatasets import MsDataset
from modelscope.utils.constant import DownloadMode
cache_dir = '/home/ly261666/datasets'
test_set_1 = MsDataset.load('3rd_Anti-UAV', namespace='ly261666', cache_dir=cache_dir, download_mode=DownloadMode.FORCE_REDOWNLOAD)
print(next(iter(test_set_1)))
You can also download dataset from the url。 Evaluate code can be seen in the section "Baseline Evaluation Code for test Set" in this page.
Installation
conda create -n anti_uav python=3.7
conda activate anti_uav
# pytorch >= 1.3.0
pip install torch==1.8.1+cu102 torchvision==0.9.1+cu102 torchaudio==0.8.1 --extra-index-url https://download.pytorch.org/whl/cu102
git clone https://github.com/ly19965/CVPR_Anti_UAV
cd CVPR_Anti_UAV
pip install -r requirements/tests.txt
pip install -r requirements/framework.txt
pip install -r requirements/cv.txt
pip install -r requirements/yolov5.txt
Download Dataset
Run the download code:
from modelscope.msdatasets import MsDataset
from modelscope.utils.constant import DownloadMode
## set dataset path
cache_dir = '/home/ly261666/datasets'
# Download train set
train_set = MsDataset.load('3rd_Anti-UAV', namespace='ly261666', split='train', cache_dir=cache_dir, download_mode=DownloadMode.FORCE_REDOWNLOAD)
print(next(iter(train_set)))
# Download validation set
val_set = MsDataset.load('3rd_Anti-UAV', namespace='ly261666', split='validation', cache_dir=cache_dir, download_mode=DownloadMode.FORCE_REDOWNLOAD)
print(next(iter(val_set)))
Baseline Evaluation Code for validation Set (Only Support Evalutation Code)
Evaluation code for track1
cd CVPR_Anti_UAV
CUDA_VISIBLE_DEVICES=0 PYTHONPATH=. python tests/pipelines/test_anti-uav_val_track1.py
eval result: 0.125
Note:
- The validation dataset for track1 can be downloaded automatically.
- Set the dataset path (line 28) in tests/pipelines/testanti-uavval_track1.py
Evaluation code for track2
cd CVPR_Anti_UAV
CUDA_VISIBLE_DEVICES=1 PYTHONPATH=. python tests/pipelines/test_anti-uav_val_track2.py
eval result: 0.125
Note:
- The validation dataset for track2 can be downloaded automatically.
- Set the dataset path (line 28) in tests/pipelines/testanti-uavval_track2.py
Baseline Training and Evalution Code on Validation Set
Track 1
Ostracker Training code for track1
## git pull ostracker code
git clone -b ostracker https://github.com/ly19965/CVPR_Anti_UAV
## Training code on Got-10k dataset
cd CVPR_Anti_UAV
PYTHONPATH=. python uav_scripts/train_ostracker_got10k_l.py
## Training code on Anti-UAV 2023 dataset
cd CVPR_Anti_UAV
PYTHONPATH=. python uav_scripts/train_ostracker_uav_l.py
Note:
- The training dataset (Anti-UAV-23 and Got-10k) can be downloaded automatically
- Set the dataset path, cachepath and pretrainmodel path in uavscripts/trainostrackergot10kl.py and uavscripts/trainostrackeruavl.py
- More training Details can be seen in OstrackerModelGot-10kL and OstrackerModelUAVL. OstrackerModelUAVL is a pretrain model for OstrackerModelGot-10kL.
Training code for track1
## Training code on Got-10k dataset
cd CVPR_Anti_UAV
PYTHONPATH=. python uav_scripts/train_siamfc_got10k.py
## Training code on Anti-UAV 2023 dataset
cd CVPR_Anti_UAV
PYTHONPATH=. python uav_scripts/train_siamfc_uav.py
Note:
- The training dataset (Anti-UAV-23 and Got-10k) can be downloaded automatically
- Set the dataset path, cachepath and pretrainmodel path in uavscripts/trainsiamfcgot10k.py and uavscripts/trainsiamfcuav.py
- More training Details can be seen in SiamfcModelGot-10kS and SiamfcModelAnti-UAV-23S. SiamfcModelGot-10kS is a pretrain model for SiamfcModelAnti-UAV-23S.
Evaluation code for track1
cd CVPR_Anti_UAV
PYTHONPATH=. python uav_scripts/test_anti-uav_val_track1.py
Note:
- The validation dataset (Anti-UAV-23) can be downloaded automatically.
- Set the modelid (line25 damo/cvalexvideo-single-object-trackingsiamfc or damo/cvalexvideo-single-object-trackingsiamfc-uav) in uavscripts/testanti-uavval_track1.py
Track 1
Training code for track2
cd CVPR_Anti_UAV
CUDA_VISIBLE_DEVICES=1 PYTHONPATH=. python uav_scripts/train_uav_detection.py
Note:
- The training dataset (Anti-UAV-23) can be downloaded automatically.
- Set the dataset path and cachepath in uavscripts/trainuavdetection.py
- More training Details can be seen in DamoYoloAnti-UAV-23S
- The Large model will be released in DamoYoloAnti-UAV-23L before 20230211
Evaluation code for track2
cd CVPR_Anti_UAV
PYTHONPATH=. python uav_scripts/test_anti-uav_val_track2.py
eval result: 0.169
Note:
- The validation dataset (Anti-UAV-23) can be downloaded automatically.
- Set the traker (line24 damo/cvalexvideo-single-object-trackingsiamfc-uav) and detetion modelid (line27 damo/cvtinynasuav-detectiondamoyolo) in uavscripts/testanti-uavval_track2.py
- Test your owr model:
line 101 in uav_scripts/test_anti-uav_val_track2.py
tracker_model_path = ""
det_model_path = ""
uav_tracker.model.load_state_dcit(torch.load(tracker_model_path))
uav_detection.model.load_state_dcit(torch.load(det_model_path))
Baseline Evaluation Code for test Set
Note: Code is available now, but the test set will be released in 2023.03.07.
Evaluation code for track1
- Test SiamFC tracker with initial target ground-truth box
cd CVPR_Anti_UAV
python tests/pipelines/test_anti-uav_track1.py
Note:
- The track1 dataset can be downloaded automatically.
- Set the dataset path (line 28) in testanti-uavtrack1.py
- You can evaluation other model by setting model path (line 38) and model network architecture (line 11) in modelscope/pipelines/cv/antiuavcvpr2023_pipeline.py
- Submit track1.zip to track1: cd results/SiamFC && zip track1.zip *
You will see following results (If IR_label.json is available):
[001/140] 20190925_131530_1_7 IR Fixed Measure: 0.245
[002/140] 20190925_213001_1_5 IR Fixed Measure: -0.164
[003/140] 20190925_222534_1_3 IR Fixed Measure: 0.800
[004/140] 20190926_183941_1_8 IR Fixed Measure: 0.754
...
[Overall] IR Mixed Measure:
Evaluation code for track2
- Test SiamFC tracker and Yolov5 without initial target ground-truth box)
- Detect the initial state of target using yolov5 then track the target using SiamFC. (You can also use detectors and trackers together for localization.)
- Submit track2.zip to track2: cd results/Yolo_SiamFC && zip track2.zip *
cd CVPR_Anti_UAV
pip install -r yolov5/requirements.txt
python tests/pipelines/test_anti-uav_track2.py
Note:
- The track2 dataset can be downloaded automatically.
- Set the dataset path (line 28) in testanti-uavtrack1.py
- You can evaluation other model by setting model path (line 39) and model network architecture (line 12) in modelscope/pipelines/cv/antiuavcvpr2023_pipeline.py
评论