• Stars
    star
    360
  • Rank 118,230 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 3 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Learning To Count Everything

image

This is the official implementation of the following CVPR 2021 paper:

Learning To Count Everything
Viresh Ranjan, Udbhav Sharma, Thu Nguyen and Minh Hoai
Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2021.

Link to arxiv preprint: https://arxiv.org/pdf/2104.08391.pdf

Short presentation video

Short Presentation

Dataset download

Images can be downloaded from here: https://drive.google.com/file/d/1ymDYrGs9DSRicfZbSCDiOu0ikGDh5k6S/view?usp=sharing

Precomputed density maps can be found here: https://archive.org/details/FSC147-GT

Place the unzipped image directory and density map directory inside the data directory.

Installation with Conda

conda create -n fscount python=3.7 -y

conda activate fscount

python -m pip install matplotlib opencv-python notebook tqdm

conda install pytorch==1.4.0 torchvision==0.5.0 cudatoolkit=10.0 -c pytorch

Quick demo

Provide the input image and also provide the bounding boxes of exemplar objects using a text file:

python demo.py --input-image orange.jpg --bbox-file orange_box_ex.txt 

Use our provided interface to specify the bounding boxes for exemplar objects

python demo.py --input-image orange.jpg

Evaluation

We are providing our pretrained FamNet model, and the evaluation code can be used without the training.

Testing on validation split without adaptation

python test.py --data_path /PATH/TO/YOUR/FSC147/DATASET/ --test_split val

Testing on val split with adaptation

python test.py --data_path /PATH/TO/YOUR/FSC147/DATASET/ --test_split val --adapt

Training

python train.py --gpu 0

Citation

If you find the code useful, please cite:

@inproceedings{m_Ranjan-etal-CVPR21,
  author = {Viresh Ranjan and Udbhav Sharma and Thu Nguyen and Minh Hoai},
  title = {Learning To Count Everything},
  year = {2021},
  booktitle = {Proceedings of the {IEEE/CVF} Conference on Computer Vision and Pattern Recognition (CVPR)},
}

More Repositories

1

DewarpNet

Code for the paper "DewarpNet: Single-Image Document Unwarping With Stacked 3D and 2D Regression Networks" (ICCV '19)
Python
475
star
2

DM-Count

Code for NeurIPS 2020 paper: Distribution Matching for Crowd Counting.
Python
204
star
3

doc3D-dataset

A hybrid dataset for document unwarping (Paper: https://www3.cs.stonybrook.edu/~cvl/projects/dewarpnet/storage/paper.pdf)
Shell
155
star
4

SID

Official implementation for ICCV19 "Shadow Removal via Shadow Image Decomposition"
Jupyter Notebook
96
star
5

PaperEdge

The code and the DIW dataset for "Learning From Documents in the Wild to Improve Document Unwarping" (SIGGRAPH 2022)
Python
83
star
6

Scanpath_Prediction

Predicting Goal-directed Human Attention Using Inverse Reinforcement Learning (CVPR2020)
Python
76
star
7

BodyHands

Whose Hands Are These? Hand Detection and Hand-Body Association in the Wild, CVPR 2022
Python
70
star
8

zero-shot-counting

CVPR2023 Zero-shot Counting
Python
49
star
9

ContactHands

Detecting Hands and Recognizing Physical Contact in the Wild, NeurIPS 2020.
Python
45
star
10

fsl-rsvae

Python
34
star
11

DocIIW

Repository for Intrinsic Decomposition of Document Images In-the-Wild (BMVC '20)
Python
34
star
12

EmotionNet_CVPR2020

Python
31
star
13

SAMPath

Repository for "SAM-Path: A Segment Anything Model for Semantic Segmentation in Digital Pathology" (MedAGI2023, MICCAI2023 workshop)
Python
28
star
14

local_learning_wsi

Repository for "Gigapixel Whole-Slide Images Classification using Locally Supervised Learning"
Python
27
star
15

PathLDM

Official Code for PathLDM: Text conditioned Latent Diffusion Model for Histopathology (WACV 2024)
Jupyter Notebook
27
star
16

Large-Image-Diffusion

CVPR 2024: Learned representation-guided diffusion models for large-image generation
Jupyter Notebook
25
star
17

scenes100

Python
22
star
18

HandLer

Forward Propagation, Backward Regression and Pose Association for Hand Tracking in the Wild (CVPR 2022)
Python
20
star
19

vfd-iccv21

Python
19
star
20

PromptMIL

Repository for "Prompt-MIL: Boosting Multi-Instance Learning Schemes via Task-specific Prompt Tuning" (MICCAI2023)
Python
16
star
21

SelfMedMAE

Code for ISBI 2023 paper "Self Pre-training with Masked Autoencoders for Medical Image Classification and Segmentation"
Python
16
star
22

Iso-UVField

Learning an Isometric Surface Parameterization for Texture Unwrapping (ECCV 2022)
Python
13
star
23

Emotion-Prediction

Visual Emotion Prediction (as a single-label problem) -- MS Thesis
Python
12
star
24

Gazeformer

Official codebase for "Gazeformer: Scalable, Effective and Fast Prediction of Goal-Directed Human Attention" (CVPR 2023)
Python
12
star
25

Target-absent-Human-Attention

Target-absent Human Attention (ECCV2022)
Python
11
star
26

PLM_SSL

Repository for "Precise Location Matching Improves Dense Contrastive Learning in Digital Pathology"
Python
8
star
27

LSAE

PyTorch Implementation of Lung Swapping Autoencoder
Python
7
star
28

fewshot-conditional-diffusion

Official code for "Conditional Generation from Unconditional Diffusion Models using Denoiser Representations" (BMVC 2023)
Jupyter Notebook
7
star
29

HyperMAE

Python
3
star
30

Beyond-Pixels

Beyond Pixels: Semi-Supervised Semantic Segmentation with a Multi-scale Patch-based Multi-Label Classifier (Accepted ECCV 2024)
Python
3
star
31

infinity-brush

2
star
32

EnEx

Code and datasets for BMVC 2021 paper "Exemplar-Based Early Event Prediction in Video"
Python
2
star
33

Weighting-Pseudo-Labels

2
star
34

JEAN

2
star
35

hematopoiesis-relationvae

1
star
36

TokenSparse-for-MedSeg

Code for IPMI2023 paper "Token Sparsification for Faster Medical Image Segmentation"
1
star
37

GCDR-Gaze

Repository of the paper "Diffusion-Refined VQA Annotations for Semi-Supervised Gaze Following" (ECCV 2024)
1
star