All Projects → Pongpisit-Thanasutives → Variations-of-SFANet-for-Crowd-Counting

Pongpisit-Thanasutives / Variations-of-SFANet-for-Crowd-Counting

Licence: GPL-3.0 license
The official implementation of "Encoder-Decoder Based Convolutional Neural Networks with Multi-Scale-Aware Modules for Crowd Counting"

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Variations-of-SFANet-for-Crowd-Counting

laika
Experiments with satellite image data
Stars: ✭ 97 (+24.36%)
Mutual labels:  segnet, encoder-decoder
ailia-models
The collection of pre-trained, state-of-the-art AI models for ailia SDK
Stars: ✭ 1,102 (+1312.82%)
Mutual labels:  crowd-counting
badchars
Bad char generator to instruct encoders such as shikata-ga-nai to transform those to other chars.
Stars: ✭ 178 (+128.21%)
Mutual labels:  encoder-decoder
S-DCNet
Unofficial Pytorch implementation of S-DCNet and SS-DCNet
Stars: ✭ 17 (-78.21%)
Mutual labels:  crowd-counting
MARUNet
Multi-level Attention Refined UNet for crowd counting
Stars: ✭ 30 (-61.54%)
Mutual labels:  crowd-counting
CSRNet-keras
Implementation of the CSRNet paper (CVPR 18) in keras-tensorflow
Stars: ✭ 107 (+37.18%)
Mutual labels:  crowd-counting
Image Segmentation
Implementation of FCN (8/16/32) in Tensorflow. 🌀 在TensorFlow框架下实现 FCN (全卷积神经网络) 。
Stars: ✭ 19 (-75.64%)
Mutual labels:  segnet
pixel-decoder
A tool for running deep learning algorithms for semantic segmentation with satellite imagery
Stars: ✭ 68 (-12.82%)
Mutual labels:  encoder-decoder
crowd-counting
Image Crowd Counting Using Convolutional Neural Network and Markov Random Field
Stars: ✭ 32 (-58.97%)
Mutual labels:  crowd-counting
NeuralCodeTranslator
Neural Code Translator provides instructions, datasets, and a deep learning infrastructure (based on seq2seq) that aims at learning code transformations
Stars: ✭ 32 (-58.97%)
Mutual labels:  encoder-decoder
Transformer Temporal Tagger
Code and data form the paper BERT Got a Date: Introducing Transformers to Temporal Tagging
Stars: ✭ 55 (-29.49%)
Mutual labels:  encoder-decoder
CrowdFlow
Optical Flow Dataset and Benchmark for Visual Crowd Analysis
Stars: ✭ 87 (+11.54%)
Mutual labels:  crowd-counting
Crowd-Counting-with-MCNNs
Crowd counting on the ShanghaiTech dataset, using multi-column convolutional neural networks.
Stars: ✭ 23 (-70.51%)
Mutual labels:  crowd-counting
Smart-City-Sample
The smart city reference pipeline shows how to integrate various media building blocks, with analytics powered by the OpenVINO™ Toolkit, for traffic or stadium sensing, analytics and management tasks.
Stars: ✭ 141 (+80.77%)
Mutual labels:  crowd-counting
PyramidScaleNetwork
To the best of our knowledge, this is the first work to explicitly address feature similarity issue in multi-column design. Extensive experiments on four challenging benchmarks (ShanghaiTech, UCF_CC_50, UCF-QNRF, and Mall) demonstrate the effectiveness of the proposed innovations as well as the superior performance over the state-of-the-art. Mor…
Stars: ✭ 17 (-78.21%)
Mutual labels:  crowd-counting
udacity-cvnd-projects
My solutions to the projects assigned for the Udacity Computer Vision Nanodegree
Stars: ✭ 36 (-53.85%)
Mutual labels:  encoder-decoder
NWPU-Crowd-Sample-Code
The sample code for a large-scale crowd counting dataset, NWPU-Crowd.
Stars: ✭ 140 (+79.49%)
Mutual labels:  crowd-counting
Image deionising auto encoder
Noise removal from images using Convolutional autoencoder
Stars: ✭ 34 (-56.41%)
Mutual labels:  encoder-decoder
util
封装了一些Java常用的功能
Stars: ✭ 19 (-75.64%)
Mutual labels:  encoder-decoder
W-Net-Keras
An unofficial implementation of W-Net for crowd counting.
Stars: ✭ 20 (-74.36%)
Mutual labels:  crowd-counting

Encoder-Decoder Based Convolutional Neural Networks with Multi-Scale-Aware Modules for Crowd Counting(ICPR 2020)

Official Implementation of "Encoder-Decoder Based Convolutional Neural Networks with Multi-Scale-Aware Modules for Crowd Counting" LINK

Many thanks to BL, SFANet and CAN for their useful publications and repositories.

For complete UCF-QNRF and Shanghaitech training code, please refer to BL and SFANet respectively.

Please see models for our M-SFANet and M-SegNet implementations.

Density maps Visualization

Datasets (NEW)

To reproduce the results reported in the paper, you may use these preprocessed datasets. This is not completed yet, and might be updated in the future.

Shanghaitech B dataset that is preprocessed using the Gaussian kernel Link

Bayesian preprocessed (following BL) Shanghaitech datasets (A&B) Link

The Beijing-BRT dataset Link (Originally from BRT)

Pretrained Weights

Shanghaitech A&B Link

To test the visualization code you should use the pretrained M_SegNet* on UCF_QNRF Link (The pretrained weights of M_SFANet* are also included.)

Getting started

An example code of how to use the pretrained M-SFANet* on UCF-QNRF to count the number people in an image. The test image is ./images/img_0071.jpg (from UCF-QNRF test set).

import cv2
from PIL import Image
import numpy as np

import torch
from torchvision import transforms

from datasets.crowd import Crowd
from models import M_SFANet_UCF_QNRF

# Simple preprocessing.
trans = transforms.Compose([transforms.ToTensor(), 
                            transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])
                           ])

# An example image with the label = 1236.
img = Image.open("./images/img_0071.jpg").convert('RGB')
height, width = img.size[1], img.size[0]
height = round(height / 16) * 16
width = round(width / 16) * 16
img = cv2.resize(np.array(img), (width,height), cv2.INTER_CUBIC)
img = trans(Image.fromarray(img))[None, :]

model = M_SFANet_UCF_QNRF.Model()
# Weights are stored in the Google drive link.
# The model are originally trained on a GPU but, we can also test it on a CPU.
model.load_state_dict(torch.load("./Paper's_weights_UCF_QNRF/best_M-SFANet*_UCF_QNRF.pth", 
                                 map_location = torch.device('cpu')))

# Evaluation mode
model.eval()
density_map = model(img)
# Est. count = 1168.37 (67.63 deviates from the ground truth)
print(torch.sum(density_map).item())

Citation

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

@inproceedings{thanasutives2021encoder,
  title={Encoder-Decoder Based Convolutional Neural Networks with Multi-Scale-Aware Modules for Crowd Counting},
  author={Thanasutives, Pongpisit and Fukui, Ken-ichi and Numao, Masayuki and Kijsirikul, Boonserm},
  booktitle={2020 25th International Conference on Pattern Recognition (ICPR)},
  pages={2382--2389},
  year={2021},
  organization={IEEE}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].