Code Monkey home page Code Monkey logo

autoscale_regression's Introduction

AutoScale_regression

  • An officical implementation of AutoScale regression-based method, you can find localization-based method from here.
  • AutoScale leverages a simple yet effective Learning to Scale (L2S) module to cope with significant scale variations in both localization and regression.

Structure

AutoScale_regression
|-- data            # generate target
|-- model           # model path 
|-- README.md       # README
|-- centerloss.py           
|-- config.py          
|-- dataset.py       
|-- find_contours.py           
|-- fpn.py         
|-- image.py
|-- make_npydata.py
|-- rate_model.py
|-- val.py          

Visualizations

avatar

Environment

python >=3.6
pytorch >=1.0
opencv-python >=4.0
scipy >=1.4.0
h5py >=2.10
pillow >=7.0.0

Datasets

Generate target

cd data
Edit "distance_generate_xx.py" to change the path to your original dataset folder.
python density_generate_xx.py

“xx” means the dataset name, including sh, jhu, qnrf, and nwpu.

Model

Download the pretrained model from Baidu-Disk, passward:9qfc ; or Google-Drive

Quickly test

  • git clone https://github.com/dk-liang/AutoScale_regression.git
    cd AutoScale

  • Download Dataset and Model

  • Generate target

  • Generate images list

    Edit "make_npydata.py" to change the path to your original dataset folder.
    Run python make_npydata.py .

  • Test
    python val.py --test_dataset qnrf --pre ./model/QNRF/model_best.pth --gpu_id 0
    python val.py --test_dataset jhu --pre ./model/JHU/model_best.pth --gpu_id 0
    python val.py --test_dataset nwpu --pre ./model/NWPU/model_best.pth --gpu_id 0
    python val.py --test_dataset ShanghaiA --pre ./model/ShanghaiA/model_best.pth --gpu_id 0
    python val.py --test_dataset ShanghaiB --pre ./model/ShanghaiB/model_best.pth --gpu_id 0
    More config information is provided in config.py

Training

coming soon.

References

If you are interested in AutoScale, please cite our work:

@article{xu2019autoscale,
  title={AutoScale: Learning to Scale for Crowd Counting},
  author={Xu, Chenfeng and Liang, Dingkang and Xu, Yongchao and Bai, Song and Zhan, Wei and Tomizuka, Masayoshi and Bai, Xiang},
  journal={arXiv preprint arXiv:1912.09632},
  year={2019}
}

and

@inproceedings{xu2019learn,
  title={Learn to Scale: Generating Multipolar Normalized Density Maps for Crowd Counting},
  author={Xu, Chenfeng and Qiu, Kai and Fu, Jianlong and Bai, Song and Xu, Yongchao and Bai, Xiang},
  booktitle={Proceedings of the IEEE International Conference on Computer Vision},
  pages={8382--8390},
  year={2019}
}

autoscale_regression's People

Contributors

dk-liang 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.