Giter VIP home page Giter VIP logo

steerer-for-windows's Introduction

STEERER for Object Counting and Localizaiotion (ICCV 2023)

Introduction

This is the official PyTorch implementation of paper: STEERER: Resolving Scale Variations for Counting and Localization via Selective Inheritance Learning, which effectively addressed the issue of scale variations for object counting and localizaioion, demonstrating the state-of-arts counting and localizaiton performance for different catagories, such as crowd,vehicle, crops and trees framework.

Catalog

  • Training and Testing Code (18/08/2023)
  • Pretrained models for SHHB, JHU, TRANSCOS, MTC, TREE (30/10/2023)
  • Pretrained models for NWPU, QNRF (coming soon)

Getting started

preparation

  • Download this repo in the directory (folder/):

  • Install dependencies. We use python 3.9 and pytorch >= 1.12.0 : http://pytorch.org.

conda create -n STEERER python=3.9 -y
conda activate STEERER
conda install pytorch==1.12.0 torchvision==0.13.0 cudatoolkit=11.3 -c pytorch
cd folder\STEERER-main
pip install -r requirements.txt
  • !!! Processed datasets and Pretrained-weights are available at the OneDrive net disk, and you can selectively dolownd the dataset that you want to train or inference. Before starting your training and testing, you should organiza your project as the following directory tree.
  $root/
  ├── ProcessedData
  │   ├── SHHB
  │   │   ├── images     # the input images
  │   │   ├── jsons      # the annotated labels
  │   │   ├── train.txt   # the image name of train set 
  │   │   ├── test.txt    # the image name of test set
  │   │   ├── test_gt_loc.txt  # the localization labels for evaluation
  │   │   └── train_gt_loc.txt  # the localization labels for train set (not used)
  │   ├── SHHA
  │   ├── NWPU
  │   ├── QNRF
  │   ├── JHU
  │   ├── MTC
  │   ├── JHU
  │   ├── TRANCOS_v3
  │   └── TREE
  ├── PretrainedModels
  └── STEERER

Run .sh file on Windows

  1. Install Git.
  2. Go to C:\Program Files\Git\bin\ run sh.exe

Training

we provide simplify script to run distributed or cluster training,

# $1 is the configuration file, $2 is the GPU_ID
sh train.sh configs/SHHB_final.py 1  

# mltiple GPUs
sh train.sh configs/SHHB_final.py 0,1,2,3 

or if you are trainging on the computer cluster, you could be run

# $3 the configuration file, $4 is the number of GPUs
sh slurm_train.sh partition_name job_name configs/SHHB_final.py 1

Testing

To reproduce the performance, run the similry command like training,

# $1 is the configuration file, $2 is the checkpoint path, $3 is the GPU_ID, only support single GPU. 
sh test.sh configs/SHHB_final.py ../PretrainedModels/SHHB.pth 1

or if you are trainging on the computer cluster, you could be run

# $3 the configuration file,  $4 is the checkpoint path, $5 is the number of GPUs
sh slurm_test.sh partition_name job_name configs/SHHB_final.py ../PretrainedModels/SHHB.pth 1

Reproduce Counting and Localization Performance

Dataset MAE/MSE F1-m./Pre./Rec. (%) Pretraied Model Dataset
This Repo SHHB 5.8/8.5 87.0/89.4/84.82.01 weights Dataset
This Repo TRANSCOS 1.8/3.1 95.1/91.7/93.4/ weights Dataset
This Repo MTC 2.74/3.72 - weights Dataset
This Repo JHU 54.5/240.6 65.6/66.7/64.6 weights Dataset
This Repo TREE 8.2/11.3 72.9/70.4/75.7 weights Dataset
This Repo FDST 0.93/1.29 97.4/98.0/96.7 weights Dataset
This Repo UCF-QNRF 77.8/138.0 75.6/79.7/72.0 weights Dataset

Citation

If you find this project is useful for your research, please cite:

@article{haniccvsteerer,
  title={STEERER: Resolving Scale Variations for Counting and Localization via Selective Inheritance Learning},
  author={Han, Tao, Bai Lei, Liu Lingbo, and Ouyang  Wanli},
  booktitle={ICCV},
  year={2023}
}

Acknowledgement

The released PyTorch training script borrows some codes from the HRNet and MMCV repositories. If you think this repo is helpful for your research, please consider cite them.

steerer-for-windows's People

Contributors

taohan10200 avatar sullivantee avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.