Skip to content
ECCV 2018 - Where are the Blobs: Counting by Localization with Point Supervision
Python Shell
Branch: master
Clone or download
Latest commit 61d2b9d Jul 30, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
checkpoints Update download.sh Dec 25, 2018
datasets Fixed indexing issue Jul 30, 2019
figures added exmaple image Dec 4, 2018
LICENSE first Oct 19, 2018
README.md Added shanghai checkpoint Jul 30, 2019
applyOnImage.py added exmaple image Dec 4, 2018
experiments.py added exmaple image Dec 4, 2018
losses.py first Oct 19, 2018
main.py Add `--reset` commandline argument Dec 25, 2018
models.py updated Oct 30, 2018
summary.py updated Oct 30, 2018
test.py updated Oct 30, 2018
train.py updated Oct 30, 2018
utils.py added exmaple image Dec 4, 2018

README.md

LCFCN - ECCV 2018

Where are the Blobs: Counting by Localization with Point Supervision

[Paper][Video]

Requirements

  • Pytorch version 0.4 or higher.

Description

Given a test image, the trained model outputs blobs in the image, then counts the number of predicted blobs (see Figure below).

Shanghai test image

Test on single image

We test a trained ResNet on a Trancos example image as follows:

python main.py -image_path figures/test.png \
                -model_path checkpoints/best_model_trancos_ResFCN.pth \
                -model_name ResFCN

The expected output is shown below, and the output image will be saved in the same directory as the test image.

Trancos test image Trancos predicted image
Trancos test image Trancos pred image

Running the saved models

  1. Download the checkpoints,
bash checkpoints/download.sh

For the shanghai model, download the checkpoint from this link:

https://drive.google.com/file/d/1N75fun1I1XWh1LuKmi60QXF2SgCPLLLQ/view?usp=sharing

  1. Output the saved results,
python main.py -m summary -e trancos
  1. Re-evaluate the saved model,
python main.py -m test -e trancos

Training the models from scratch

To train the model,

python main.py -m train -e trancos

Benchmark

Method Trancos Pascal
ResFCN 3.39 0.31
Paper 3.32 0.31

Citation

If you find the code useful for your research, please cite:

@Article{laradji2018blobs,
    title={Where are the Blobs: Counting by Localization with Point Supervision},
    author={Laradji, Issam H and Rostamzadeh, Negar and Pinheiro, Pedro O and Vazquez, David and Schmidt, Mark},
    journal = {ECCV},
    year = {2018}
}
You can’t perform that action at this time.