Code Monkey home page Code Monkey logo

training-free-object-counter's Introduction

Training-free Object Counting with Prompts authored by Zenglin Shi, Ying Sun, Mengmi Zhang. [pdf] [poster] [video]

Installation

1. The code requires python>=3.8, as well as pytorch>=1.7 and torchvision>=0.8.
2. Please follow the instructions here to install both PyTorch and TorchVision dependencies.
3. Installing both PyTorch and TorchVision with CUDA support is strongly recommended.

Getting Started

1. Download the 'vit_b' pre-trained model of SAM and save it to the folder 'pretrain'.
2. Download the FSC-147 and CARPK datasets and save them to the folder 'dataset'
3. Run
python main-fsc147.py --test-split='test' --prompt-type='box' --device='cuda:0'

or

python main-carpk.py --test-split='test' --prompt-type='box' --device='cuda:0'

or Apple Silicon M Series

python main-fsc147.py --test-split='test' --prompt-type='box' --device='mps'

Success and failure results

Acknowledgment

We express our sincere gratitude to the brilliant minds behind SAM, Personalize-SAM and CLIP-Surgery, as our code builds upon theirs.

Citing

If you use our code in your research, please use the following BibTeX entry.
@inproceedings{Shi2023promptcounting,
  title={Training-free Object Counting with Prompts},
  author={Zenglin Shi, Ying Sun, Mengmi Zhang},
  booktitle={WACV},
  year={2024}
}

training-free-object-counter's People

Contributors

shizenglin avatar vulpes94 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.