miao0913 / sacnn-crowdcounting-tencent_youtu Goto Github PK
View Code? Open in Web Editor NEWCrowd Counting Via Scale-adaptive Convolutional Neural Network
Crowd Counting Via Scale-adaptive Convolutional Neural Network
Hi @miao0913 ,
Thanks for your code. When I check your "train.prototxt", the data type is "Data", so how to generate training data with "LMDB" as a suffix?
By the way, where is the "CrowdData" layer when I check the "caffe.proto"?
Thank you very much!
Samylee
hello
when i run sh train_sacnn.sh
there is a bug:
sed: can't read train_c.prototxt: No such file or directory sed: can't read train_c.prototxt: No such file or directory sed: can't read train_c.prototxt: No such file or directory sed: can't read train_c.prototxt: No such file or directory
and i read the train_sacnn.sh + test_sacnn.sh, i find some files are not contained.
i can not find the files called in train_sacnn.sh and test_sacnn.sh
In train_sacnn.sh:
1、how can i get the Train_Data and Train_GT
2、how can i get the log.txt
3、how can i download the pretrain_iter_95000.caffemodel. i can just download ShanghaiTech with PartA and PartB which contain ShanghaiTech_part_A.caffemodel and ShanghaiTech_part_B.caffemodel respective.
Is pretrain_iter_95000.caffemodel the same as ShanghaiTech_part_A.caffemodel?
In test_sacnn.sh:
1、what is LIB stand for
2、how can i get lmdb
3、how can i get test_data/test_img
4、how can i get list.txt
5、how can i get estdmap.txt and estdmap.db
looking forward to your reply, thanks
/usr/local/bin/protoc datum.proto --cpp_out=.
make: *** No rule to make target 'lmdb2txt_data.cpp', needed by 'all'. Stop.
make: *** Waiting for unfinished jobs....
make: /usr/local/bin/protoc: Command not found
Makefile:11: recipe for target 'datum.pb.cc' failed
make: *** [datum.pb.cc] Error 127
I cannot find the 'lmdb2txt_data.cpp' ? Did you forget to upload the file? Or maybe I make it wrong.
when i run the script : sh train_sacnn.sh
it remind me to :please input the average loss
should i input a integer or some else?
what label tool do you use?
the newest caffe 1.0.0(not 1.0.0-rc3 or 1.0.0-rc5) proto is not compatible the proto sacnn provided, can you tell me the version of caffe do you use?
Hi,do you know how to convert csv(data label) to lmdb(caffe train input)?
in your paper, you said you set the batch size as 1
but if i want to change the batch_size to 4,
i find i change the parameter of batch_size in train.prototxt is not work, if i should change other parameters in other script?
thanks for your reply
Can anyone tell me which file has the network architecture and need some resources to understand the architecture of SaCNN and how can we use a prototext file.
Thank You.
do u have labeled WorldExpo’10 crowd counting dataset?
Hello, first of all, thank you very much for your work.
I encountered a problem when using your code:
Undefined variable "image_info" or class "image_info".
I looked at your code and found that there is no definition of image_info. What is image_info?
Hello, I am recently reproducing your results on WolrdExpo dataset but still can not get the same results, can you send me more preprocessing and training details for me to reproduce it? Thank you very much!
hello, have you trained the model directly on the shanghaitech dataset, or have you trained it on imagenet then fineturn it ??? I directly train it , but the loss is about is 60, I doubt it has something wrong
thank u for your sharing!
what is the size of the input image? need it to be cropped to one fixed size?
If the input is original size, when concat layer"conv4_3" and layer "conv_concat1_2x",the shapes may be not the same.
Sorry to bother, but I have one question about the shape of ground truth density map in this repo.
You say in your essay that the output density map if 1/8 of the input image, so is it necessary for me to downsample my density map by factor 8. And if I want to prepare my data in lmdb format, I should turn the ground truth csv into density map picture, right?
Dear author. When I reproduce your code of SaCNN, the following problems occurred:
~/SaCNN-CrowdCounting-Tencent_Youtu/SaCNN-master$ sh train_sacnn.sh : not found.sh: 3: train_sacnn.sh: : not found.sh: 12: train_sacnn.sh: Please input train average loss: 1 : bad variable name read: average_loss : not found.sh: 15: train_sacnn.sh: : No such file or directorytotxt : No such file or directorytotxt : No such file or directorytotxt : No such file or directorytotxt : not found.sh: 20: train_sacnn.sh: : No such file or directoryotxt : No such file or directoryotxt : not found.sh: 23: train_sacnn.sh: train_sacnn.sh: 53: train_sacnn.sh: Syntax error: end of file unexpected (expecting "fi")
~/SaCNN-CrowdCounting-Tencent_Youtu/caffe$ make all -j8 PROTOC src/caffe/proto/caffe.proto NVCC src/caffe/solvers/sgd_solver.cu NVCC src/caffe/solvers/adagrad_solver.cu NVCC src/caffe/solvers/adam_solver.cu NVCC src/caffe/solvers/rmsprop_solver.cu NVCC src/caffe/solvers/nesterov_solver.cu NVCC src/caffe/solvers/adadelta_solver.cu NVCC src/caffe/layers/bnll_layer.cu NVCC src/caffe/layers/bias_layer.cu NVCC src/caffe/layers/cudnn_relu_layer.cu NVCC src/caffe/layers/log_layer.cu NVCC src/caffe/layers/scale_layer.cu NVCC src/caffe/layers/absval_layer.cu NVCC src/caffe/layers/triplet_loss_layer.cu NVCC src/caffe/layers/deconv_layer.cu NVCC src/caffe/layers/hdf5_output_layer.cu NVCC src/caffe/layers/tile_layer.cu src/caffe/layers/triplet_loss_layer.cu(66): error: class "caffe::LayerParameter" has no member "triplet_loss_param" detected during instantiation of "void caffe::TripletLossLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=float]" (146): here src/caffe/layers/triplet_loss_layer.cu(101): error: class "caffe::LayerParameter" has no member "triplet_loss_param" detected during instantiation of "void caffe::TripletLossLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=float]" (146): here src/caffe/layers/triplet_loss_layer.cu(66): error: class "caffe::LayerParameter" has no member "triplet_loss_param" detected during instantiation of "void caffe::TripletLossLayer<Dtype>::Forward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=double]" (146): here src/caffe/layers/triplet_loss_layer.cu(101): error: class "caffe::LayerParameter" has no member "triplet_loss_param" detected during instantiation of "void caffe::TripletLossLayer<Dtype>::Backward_gpu(const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob<Dtype> *, std::allocator<caffe::Blob<Dtype> *>> &) [with Dtype=double]" (146): here 4 errors detected in the compilation of "/tmp/tmpxft_00007334_00000000-17_triplet_loss_layer.compute_61.cpp1.ii". Makefile:594: recipe for target '.build_release/cuda/src/caffe/layers/triplet_loss_layer.o' failed make: *** [.build_release/cuda/src/caffe/layers/triplet_loss_layer.o] Error 1 make: *** Waiting for unfinished jobs....
as shown the error, if it is caused by the code from raw caffe.proto deleted?
Looking forward to your answer, thank you
Sorry for interrupting, but I met some problems when making caffe under the command "make all" , the errors are listed as follow.
/workspace/mnt/group/customization/pengyuyan/SaCNN-CrowdCounting-Tencent_Youtu/caffe/src/caffe/layers/swish_layer.cu(16): error: class "caffe::LayerParameter" has no member "swish_param"
detected during instantiation of "void caffe::SwishLayer::Forward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=float]"
(52): here
/workspace/mnt/group/customization/pengyuyan/SaCNN-CrowdCounting-Tencent_Youtu/caffe/src/caffe/layers/swish_layer.cu(44): error: class "caffe::LayerParameter" has no member "swish_param"
detected during instantiation of "void caffe::SwishLayer::Backward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=float]"
(52): here
/workspace/mnt/group/customization/pengyuyan/SaCNN-CrowdCounting-Tencent_Youtu/caffe/src/caffe/layers/swish_layer.cu(16): error: class "caffe::LayerParameter" has no member "swish_param"
detected during instantiation of "void caffe::SwishLayer::Forward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=double]"
(52): here
/workspace/mnt/group/customization/pengyuyan/SaCNN-CrowdCounting-Tencent_Youtu/caffe/src/caffe/layers/swish_layer.cu(44): error: class "caffe::LayerParameter" has no member "swish_param"
detected during instantiation of "void caffe::SwishLayer::Backward_gpu(const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &, const std::vector<__nv_bool, std::allocator<__nv_bool>> &, const std::vector<caffe::Blob *, std::allocator<caffe::Blob *>> &) [with Dtype=double]"
(52): here
4 errors detected in the compilation of "/tmp/tmpxft_00001ce6_00000000-7_swish_layer.cpp1.ii".
CMake Error at cuda_compile_generated_swish_layer.cu.o.cmake:266 (message):
Error generating file
/workspace/mnt/group/customization/pengyuyan/SaCNN-CrowdCounting-Tencent_Youtu/caffe/build/src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_swish_layer.cu.o
src/caffe/CMakeFiles/caffe.dir/build.make:483: recipe for target 'src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_swish_layer.cu.o' failed
make[2]: *** [src/caffe/CMakeFiles/cuda_compile.dir/layers/cuda_compile_generated_swish_layer.cu.o] Error 1
CMakeFiles/Makefile2:304: recipe for target 'src/caffe/CMakeFiles/caffe.dir/all' failed
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I'm on ubuntu16.04 with python2.7, cuda8.0 and cudnn6.
Many thanks.
hi @miao0913 ,
Sorry to bother you again.
I sent an email to your email address([email protected]). My email address is [email protected].
Ask for your help, please!
I am looking forward to your reply!
Thank you very much!
samylee
Before using SaCnn to train, I want to test it.But I met some error, hoping that u can help me.Thank you very much!
This is the error I met in the run time of crowdtest.m when i run test_sacnn.sh :
malloc: unknown:0: assertion botched
free: called with unallocated block argument
last command: (null)
Aborting...LD_LIBRARY_PATH=/usr/local/lib/home/code/yuying/caffe-master/build/tools/extract_features /home/code/yuying/SaCNN/model/Part_B/ShanghaiTech_part_B.caffemodel deploy.prototxt estdmap estdmap.db 10 lmdb GPU 2: Aborted
Actually, and I'm not familiar with matcaffe,.There are some code I don't understand.
system([lib caffe_path ' ' caffe_model ' deploy.prototxt estdmap estdmap.db ' num2str(nImg) ' lmdb GPU ' num2str(gpu_id)]);
system([lmdb2txt ' estdmap.db >> estdmap.txt']);
Can u explain it?Or can u tell me what should i do to understand it?
Thank u very much!Best wishes!
Hello miao0913,
Can you provide the trained model for the deploy.prototxt file?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.