Skip to content

Latest commit

 

History

History

testing

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Pretrained models and test code

This folder contains of a demo test code that can be used for DM Count network. The original testing code was taken from the DM Count repo and modified.

Step 1 : Download the pretrained model

The pretrained models that were used to prepare results for different datasets and networks are given in the following zenodo links.

Network name link
BL (NWPU,UCF,STA,STB) here
DM Count (NWPU,UCF,STA,STB) here
SCARNet (NWPU,UCF,STA,STB) here
SDCNet (NWPU,UCF,STA,STB) here
SFANet (NWPU,UCF,STA,STB) here

Step 2 : Give the data path and the model path as arguments.

Code to test the model :

python test.py --dataset <nwpu,qnrf,sta,stb> --model-path <local path to the stored model> --data-path <local path of the data location>

This code generates a txt file with the name img_name_targ_pred.txt this file contains the list of counts as :

image_name_1 , target_1, predicted_1
image_name_2 , target_2, predicted_2
.
.
.
image_name_n , target_n, predicted_n

Here image_name_i can be a string or an int that refers to the input image name to the network and predicted_i refers to the count predicted by your network from the image_name_i, and target_i represents its ground truth.

We encourage you to send us a pull request here following the format mentioned here to include your network in our work.