Code Monkey home page Code Monkey logo

acscp_cgan's Introduction

HEAD

ACSCP crowd counting model

======= License

Introduction

This is open source project for crowd counting. Implement with paper "Crowd Counting via Adversarial Cross-Scale Consistency Pursuit" from Shanghai Jiao Tong University. For more details, please refer to our Baidu Yun

multimotivations-scale block

loss

generator

architecture

comparision

loss_result

pathch_errors

result_ShanghaiTech

lambda_c

tensorboard

Contents

  1. Installation
  2. Preparation
  3. Train/Eval/Release
  4. Additional
  5. Details

Installation

  1. Configuration requirements
python3.x

Please using GPU, suggestion more than GTX960

python-opencv
#tensorflow-gpu==1.0.0
#tensorflow==1.0.0
scipy==1.0.1
matplotlib==2.2.2
numpy==1.14.2

conda install -c https://conda.binstar.org/menpo opencv3
pip install -r requirements.txt
  1. Get the code
git clone [email protected]:Ling-Bao/ACSCP_cGAN.git
cd ACSCP_cGAN

Preparation

  1. ShanghaiTech Dataset. ShanghaiTech Dataset makes by Zhang Y, Zhou D, Chen S, et al. For more detail, please refer to paper "Single-Image Crowd Counting via Multi-Column Convolutional Neural Network" and click on here.

  2. Get dataset and its corresponding map label Baidu Yun Password: yvs1

  3. Unzip dataset to ACSCP_cGAN root directory

unzip Data.zip

Train/Eval/Release

Train is easy, just using following step.

  1. Train. Using main.py to train crowd counting model
python main.py --phase train
  1. Eval. Using main.py to evalute crowd counting model
python main.py --phase test

OR

python main.py --phase inference
  1. Model release Model release. Using product.py to release crowd counting model. Download release version 1.0.0, please click on here

Addtional

  1. Crowd map generation tools Source code store in "data_maker", detail please check here. **Note: **This tools write by matlab, please install matlab.

  2. Results

    formulation

    Original image

    formulation

    Real crowd map, counting is 707

    formulation

    Predict crowd map, counting is 698

  1. crowd counting paper collection, thanks for gjy3035 Github: Awesome-Crowd-Counting Density Map Generation from Key Points: [Matlab Code] [Python Code]

Details

  1. Tring to delete dropout layers.

======= License

TAIL

acscp_cgan's People

Contributors

ling-bao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

acscp_cgan's Issues

tensorflow版本问题

ValueError: Variable vgg_16/conv1/conv1_1/weights already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope?
出现这个问题,看前面的问答,是版本问题,请问如何修改代码以适应高版本呢?

标注问题

为什么 我进行标注 完成之后生成GT_mat文件 没有后缀 并且标注一次覆盖一次 有谁能解决一下么?

ROI 问题

您好,不知道您在UCSD和worldexpo'10这两个数据集做过测试没有,这两个数据集都有一个ROI区域的限制。那最后对密度图求和的时候,是采用整张图求和还是对密度图的ROI部分进行求和?

论文的例子复现问题

您好,我尝试着跑了一些论文出现的例子,比如ShangehaiTech/part_B/test_data/images/IMG_141.jpg,(论文中Figure 4.的第5行),得到的estimated=236, 与论文中的33.9相差甚远。

我是参考的product.py的代码去跑的, 图片resize成720x720。请问我使用的方法对吗?

提前感谢。

关于代码运行报错

您好!很高兴您能够分享您的项目,不过我用您的代码直接运行python main.py --phase train会报错,提示:
ValueError: Variable vgg_16/conv1/conv1_1/weights already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:
File "/home/user/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 216, in variable
use_resource=use_resource)
File "/home/user/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 181, in func_with_args
return func(*args, **current_args)
File "/home/user/anaconda2/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 261, in model_variable
use_resource=use_resource)
即使将vgg_feature.py中的相关函数注释掉也还是一样的,请问您能帮忙解释下么?跪求!

关于ACSCP算法实现的几个疑问,还请指教……

您好!很高兴您能够分享关于ACSCP算法的实现,关于您的实现我有几个疑问还请指教:
1)论文中说,生成网络的最后一层后面应该是tanh激活函数,但是看您用的是先Sigmoid后ReLU?
2)生成网络是一个U-Net的结构,在镜像对称的卷积和反卷积层中间添加了skip connections,不应该是e1连接d8、e2连接d7吗?看您是e1连接d7、e2连接d6呢?
3)训练方面,作者训练了300个epoch,前100个epoch,λc=0;后200个epoch λc=10,不知您是否是这样训练的?
4)另外您给出的结果示例,应该是IMG_173_A的图吧,可是原测试数据集中给的ground truth是483个人,而您给出的结果中ground truth人数是707人呢?
5)我用您的代码和数据集训练,在product时生成的密度图咋有很多竖条纹?
6)由密度图得出人数,直接round(sum(sum(mp)))就可以了,这是什么原理?
希望您能够在百忙之中抽出时间予以解答,不生感激,谢谢!

标签制作第二步

您好,之前在尝试给自己的训练集打标签。您所给出的制作标签第二步matlab代码,应当输出mat文件。但是我的check程序跑不动,请问check是什么功能,是否可以忽略第三步中的gt文件是第二步手动标注所获得的的吧。希望得到您的帮助。

密度图问题

为什么ground truth里面标记的头的坐标不是整数?

输入图像尺寸大小问题

您好,看了您的一系列回答,代码中使用padding将图像尺寸固定,请问
1)怎样使用padding固定尺寸,
2)固定尺寸的同时,需要对密度图进行处理吗?

UCF_CC_50 dataset

Hi! Thanks for your project and can you give me your UCF_CC_50 with .npy dataset?
Thanks!

Download link for shanghaitech

Hi, I was wondering whether you have any plan to release the dataset through dropbox or google drive. It seems like downloading through Baidu cloud requires an account which also needs Chinese phone number.

Can you please also upload the dataset to any other platforms?

Thanks.

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.