Skip to content

vlad3996/lsc-cnn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LSC-CNN

Simple test on image

import cv2
from model import LSCCNN

checkpoint_path = './weights/part_b_scale_4_epoch_24_weights.pth'

network = LSCCNN(checkpoint_path=checkpoint_path)
network.cuda()
network.eval();

image = cv2.imread('./dataset/ST_partB/test_data/images/IMG_2.jpg')
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

pred_dot_map, pred_box_map, img_out = network.predict_single_image(image, nms_thresh=0.25)

plt.figure(figsize=(18,10))
plt.imshow(img_out)
plt.show()

This repository is a fork of the pytorch implementation for the crowd counting model, LSC-CNN, proposed in the paper - Locate, Size and Count: Accurately Resolving People in Dense Crowds via Detection.

@article{LSCCNN19,
    Author = {Sam, Deepak Babu and Peri, Skand Vishwanath and Mukuntha .N .S ,  and Kamath, Amogh and Babu, R. Venkatesh},
    Title = {Locate, Size and Count: Accurately Resolving People in Dense Crowds via Detection},
    Journal = {arXiv:1906.07538},
    Year = {2019}
}

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 98.0%
  • Python 2.0%