Giter VIP home page Giter VIP logo

spdcn-cac's Introduction

SPDCN

[Homepage][paper][Poster]

official code for BMVC-2022 paper "Scale-Prior Deformable Convolution for Exemplar-Guided Class-Agnostic Counting"

pipline

Requirement

We use Singularity to build the enviroment. Download our enviroment: excalibur.sif. If you'd like to create environement yourself, the following python packages are required:

pytorch == 1.9.0
torchvision == 0.10.0
mmcv == 1.3.13
timm == 0.4.12
termcolor
yacs
einops

Data Preparation

  • Download FSC-147
  • modify the root in line 12 of datasets/gendata384x576.py to the local path of FSC-147.
  • running the file datasets/gendata384x576.py

Training

  • modify the datapath in run.sh to the local path of FSC-147 dataset
  • using singularity: singularity exec --bind --nv path_to_excalibur.sif ./run.sh
  • using your own environment: ./run.sh

A training log is shown in md-files/training.log, and corresponding checkpoint is uploaded here.

Inference Demo

A demo is presented in demo.ipynb. You can let config.resume in it be the path to the checkpoint and know about how to run our model.

Citation

@inproceedings{Lin_2022_BMVC,
author    = {Wei Lin and Kunlin Yang and Xinzhu Ma and Junyu Gao and Lingbo Liu and Shinan Liu and Jun Hou and Shuai Yi and Antoni Chan},
title     = {Scale-Prior Deformable Convolution for Exemplar-Guided Class-Agnostic Counting},
booktitle = {33rd British Machine Vision Conference 2022, {BMVC} 2022, London, UK, November 21-24, 2022},
publisher = {{BMVA} Press},
year      = {2022},
url       = {https://bmvc2022.mpi-inf.mpg.de/0313.pdf}
}

spdcn-cac's People

Contributors

elin24 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

spdcn-cac's Issues

Inference

@Elin24
thanks for this repo and congratulation for being 3rd in Object counting LB.
Could you let me know if you posted some where inference code
secondly, do the boxes are mandatory during training as well as inference ?

mmcv issue

ModuleNotFoundError: No module named 'mmcv._ext'

@Elin24
Any idea on how to resolve this ?
I used your version mentioned for mmcv

can we replace mmcvs with torchvision.ops.DeformConv2d ?

A Error in training

Thank you for your sharing. May I ask that after data preprocessing according to the code you provided, the training program reported an error:
File "/home/counting/SPDCN-CAC-main/datasets/dataset.py", line 56, in getSample
dotmap[0, points[:, 1], points[:, 0]] = 1
IndexError: index 384 is out of bounds for axis 1 with size 384

Program syntax error

Why did I encounter this error while running gendata384x576. py

File "gendata384x576.py", line 80, in
category = cates[imid]
KeyError: '1050'

How can i use

Hello! I have done all the steps, but how can I include the image I want in the code to process it? You didn't write this part.

demo.ipynb

Following your instructions, I used the script "demo.ipynb" for testing, but the test results are faulty.

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.