Code release for Dilated-Scale-Aware Category-Attention ConvNet for Multi-Class Object Counting (Accepted)
- 2021/04/21 upload the code.
- python 3.6
- PyTorch 1.3.0
- torchvision
VisDrone_class8.pth
and RSOC_class2.pth
download.
- VisDrone model best (password:qsw6) Link.
- RSOC model best (will be released when the author is free).
- Download datasets
- Extract them to
dataset/VisDrone/
anddataset/RSOC/
, respectively.
- e.g., VisDrone and RSOC (modified from the DOTA dataset) datasets
-/DSACA-main
-/DSACA-main/dataset
└─── VisDrone
└───VisDrone2019-DET-train
└───VisDrone2019-DET-val
└─── RSOC
└───train
└───val
└───test_large-vehicle.txt
└───test_ship.txt
└───test_small-vehicle.txt
└───train_large-vehicle.txt
└───train_ship.txt
└───train_small-vehicle.txt
-/DSACA-main/pre_trained
└─── VisDrone_class8.pth
└─── RSOC_class2.pth
└─── pre_trained.md
-/DSACA-main/density_generate
└─── RSOC_choose.py
└─── VisDrone.py
└─── RSOC.py
-/DSACA-main/make_npydata
└─── VisDrone_make_npydata.py
└─── RSOC_make_npydata.py
-/DSACA-main/Network
└─── VisDrone_class8.py
└─── baseline_DSAM_CAM.py
-/DSACA-main/images
└─── intro.png
└─── config.py
└─── dataset.py
└─── image.py
└─── utils.py
└─── VisDrone_train_class8_CAM_DSAM.py
└─── RSOC_train_class2_CAM_DSAM.py
└─── README.md
- Cd
density_generate
then runRSOC_choose.py
(choose large-vehicle and small-vehicle to vehicle) for multi-class scenario. - Run
VisDrone.py
andRSOC.py
for dataset pre-processing. - Cd
make_npydata
then runVisDrone_make_npydata.py
andRSOC_make_npydata.py
for target path pre-saving. - Edit
config.py
for training-parameters setting. - Run
VisDrone_train_class8_CAM_DSAM.py
orRSOC_train_class2_CAM_DSAM.py
for training & testing.
Thanks for your attention! If you have any suggestion or question, you can leave a message here or contact us directly: