Giter VIP home page Giter VIP logo

pcc-net's People

Contributors

gjy3035 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  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  avatar  avatar  avatar  avatar

pcc-net's Issues

about test.py

你好!
因为我在训练到600多epoch的时候报错了,但是用“tensorboard”也能输出所有的mae, mse包括test数据集的mae, mse.
这里我只执行了python train_lr.py, 没有执行python test.py, 所以只执行python train_lr.py输出的mae, mse具体指的什么mae和mse, 我是必须要执行test才是输出的test的mae和mse?

关于路径

你好,
__C.DATA.DATA_PATH = '/media/D/DataSet/CC/' +str(__C.DATA.STD_SIZE[0]) + 'x' + str(__C.DATA.STD_SIZE[1]) + '/shanghaitech_part_B'
这里的/media/D/DataSet/CC/对应本地的什么路径? 比如这个项目叫cnn, cnn下有个文件夹dataset,这里怎么对应

关于test.py

你好!
因为我在训练到600多epoch的时候报错了,但是用tensorboard也能输出所有的mae, mse包括test数据集的mae, mse,但是我只执行了python train_lr.py, 没有执行python test.py, 所以只执行python train_lr.py输出的mae, mse具体指的什么mae和mse, 我是必须要执行test才是输出的test的mae和mse?

about training

hello author,when I am training the shanghai_dataset model ,I meet this problem,what is maybe the reason of it? The error likes this:
Traceback (most recent call last):
File "train_lr.py", line 232, in
main()
File "train_lr.py", line 67, in main
i_tb,model_path = train(train_loader, net, optimizer, epoch, i_tb)
File "train_lr.py", line 96, in train
pred_map,pred_cls, pred_seg = net(img, gt_map, roi, gt_roi, gt_seg)
File "/home/zhulei/anaconda3/envs/maskrcnn_benchmark/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/zhulei/PCC-Net/models/CC.py", line 34, in forward
density_map, density_cls_score,pred_seg = self.CCN(img,roi)
File "/home/zhulei/anaconda3/envs/maskrcnn_benchmark/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/zhulei/PCC-Net/models/ori_big.py", line 80, in forward
x_bbx = self.roi_pool(x_hlp, roi)
File "/home/zhulei/anaconda3/envs/maskrcnn_benchmark/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call
result = self.forward(*input, **kwargs)
File "/home/zhulei/anaconda3/envs/maskrcnn_benchmark/lib/python3.6/site-packages/torchvision/ops/roi_pool.py", line 75, in forward
return roi_pool(input, rois, self.output_size, self.spatial_scale)
File "/home/zhulei/anaconda3/envs/maskrcnn_benchmark/lib/python3.6/site-packages/torchvision/ops/roi_pool.py", line 62, in roi_pool
return _RoIPoolFunction.apply(input, rois, output_size, spatial_scale)
File "/home/zhulei/anaconda3/envs/maskrcnn_benchmark/lib/python3.6/site-packages/torchvision/ops/roi_pool.py", line 19, in forward
_C = _lazy_import()
File "/home/zhulei/anaconda3/envs/maskrcnn_benchmark/lib/python3.6/site-packages/torchvision/extension.py", line 12, in _lazy_import
from torchvision import _C as C
ImportError: /home/zhulei/anaconda3/envs/maskrcnn_benchmark/lib/python3.6/site-packages/torchvision/_C.so: undefined symbol: _ZN3c107Warning4warnENS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

paper

thank you for your code. may i get this paper? or it's not publish
and can you provide the code of data preparation or some information about how to get seg data

Predict on image

Thanks for your work.
How can I use your code to count people on a single image ?

关于初始值

你好
min_gt_count = 2.7126654189217972e-05
max_gt_count = 0.001306603490202515

wts = torch.FloatTensor(
[ 0.10194444, 0.07416667, 0.08361111, 0.09277778, 0.10388889,
0.10416667, 0.10805556, 0.11 , 0.11111111, 0.11027778]
)
__C.TRAIN.INPUT_SIZE = (512,680)
这些初始值是怎么得来的呢?

How to generate the segment map?

I am trying to run this model on another dataset, but I am confused about how to generate the segment map according to the density map with the csv file? Thank you

Classification task

I want to generate the value of each class and have an output for the classification task, any idea?!

关于训练过程中报错

你好!
我训练模型的时候,训练到634epoch的时候,遇到报错,
Traceback (most recent call last):
File "train_lr.py", line 234, in
main()
File "train_lr.py", line 69, in main
i_tb,model_path = train(train_loader, net, optimizer, epoch, i_tb)
File "train_lr.py", line 82, in train
for i, data in enumerate(train_loader, 0):
File "/usr/local/lib/python3.6/dist-packages/torch/utils/data/dataloader.py", line 345, in next
data = self._next_data()
这里有可能是什么原因造成的呢

关于test.py

你好
因为我在训练到600多epoch的时候报错了,但是用tensorboard也能输出所有的mae, mse包括test数据集的mae, mse,但是我只执行了python train_lr.py, 没有执行python test.py, 所以只执行python train_lr.py输出的mae, mse具体指的什么mae和mse, 我是必须要执行test才是输出的test的mae和mse?

error when run build.py

Hi man, thanks for your share!

An error occurred when I run python build.py, the error is as follows:

Traceback (most recent call last):
  File "build.py", line 30, in <module>
    extra_objects=extra_objects
  File "/root/anaconda3/envs/pcc_env/lib/python2.7/site-packages/torch/utils/ffi/__init__.py", line 159, in create_extension
    ffi.cdef(_typedefs + all_headers_source)
  File "/root/anaconda3/envs/pcc_env/lib/python2.7/site-packages/cffi/api.py", line 112, in cdef
    self._cdef(csource, override=override, packed=packed, pack=pack)
  File "/root/anaconda3/envs/pcc_env/lib/python2.7/site-packages/cffi/api.py", line 126, in _cdef
    self._parser.parse(csource, override=override, **options)
  File "/root/anaconda3/envs/pcc_env/lib/python2.7/site-packages/cffi/cparser.py", line 347, in parse
    self._internal_parse(csource)
  File "/root/anaconda3/envs/pcc_env/lib/python2.7/site-packages/cffi/cparser.py", line 352, in _internal_parse
    ast, macros, csource = self._parse(csource)
  File "/root/anaconda3/envs/pcc_env/lib/python2.7/site-packages/cffi/cparser.py", line 296, in _parse
    self.convert_pycparser_error(e, csource)
  File "/root/anaconda3/envs/pcc_env/lib/python2.7/site-packages/cffi/cparser.py", line 325, in convert_pycparser_error
    raise CDefError(msg)
cffi.CDefError: cannot parse "int roi_pooling_forward(int pooled_height, int pooled_width, float spatial_scale,"
<cdef source string>:29:82: Illegal character '\r'

Could you help me solve this error ?
Looking forward for your reply, thank you!

train error

Hello!
I found a problem about seg loss in training with my own dataset. My segment datasets were converted to "L". In ori_big.py, model would predict segment with size[x, 2, x, x]. But I got error when training was at CrossEntropyLoss2d. Can you give some help? Thanks!

Error:
/pytorch/aten/src/THCUNN/SpatialClassNLLCriterion.cu:106: cunn_SpatialClassNLLCriterion_updateOutput_kernel: block: [4,0,0], thread: [189,0,0] Assertion t >= 0 && t < n_classes failed.
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED (createCuDNNHandle at /pytorch/aten/src/ATen/cudnn/Handle.cpp:9)
frame #0: c10::Error::Error(c10::SourceLocation, std::string const&) + 0x46 (0x7f81564a5536 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libc10.so)
frame #1: + 0x10a0c28 (0x7f81579a1c28 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cuda.so)
frame #2: at::native::getCudnnHandle() + 0xe54 (0x7f81579a3404 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cuda.so)
frame #3: + 0xf19f4c (0x7f815781af4c in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cuda.so)
frame #4: + 0xf1afe1 (0x7f815781bfe1 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cuda.so)
frame #5: + 0xf1f01b (0x7f815782001b in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cuda.so)
frame #6: at::native::cudnn_convolution_backward_input(c10::ArrayRef, at::Tensor const&, at::Tensor const&, c10::ArrayRef, c10::ArrayRef, c10::ArrayRef, long, bool, bool) + 0xb2 (0x7f8157820572 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cuda.so)
frame #7: + 0xf86090 (0x7f8157887090 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cuda.so)
frame #8: + 0xfca928 (0x7f81578cb928 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cuda.so)
frame #9: at::native::cudnn_convolution_backward(at::Tensor const&, at::Tensor const&, at::Tensor const&, c10::ArrayRef, c10::ArrayRef, c10::ArrayRef, long, bool, bool, std::array<bool, 2ul>) + 0x4fa (0x7f8157821c0a in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cuda.so)
frame #10: + 0xf863bb (0x7f81578873bb in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cuda.so)
frame #11: + 0xfca984 (0x7f81578cb984 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cuda.so)
frame #12: + 0x2c80736 (0x7f8191037736 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #13: + 0x2ccff44 (0x7f8191086f44 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #14: torch::autograd::generated::CudnnConvolutionBackward::apply(std::vector<at::Tensor, std::allocatorat::Tensor >&&) + 0x378 (0x7f8190c4f908 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #15: + 0x2d89705 (0x7f8191140705 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #16: torch::autograd::Engine::evaluate_function(std::shared_ptrtorch::autograd::GraphTask&, torch::autograd::Node*, torch::autograd::InputBuffer&) + 0x16f3 (0x7f819113da03 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #17: torch::autograd::Engine::thread_main(std::shared_ptrtorch::autograd::GraphTask const&, bool) + 0x3d2 (0x7f819113e7e2 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #18: torch::autograd::Engine::thread_init(int) + 0x39 (0x7f8191136e59 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_cpu.so)
frame #19: torch::autograd::python::PythonEngine::thread_init(int) + 0x38 (0x7f819da7e968 in /home/derek/anaconda3/envs/jim/lib/python3.7/site-packages/torch/lib/libtorch_python.so)
frame #20: + 0xc819d (0x7f81ac9d019d in /home/derek/anaconda3/envs/jim/bin/../lib/libstdc++.so.6)
frame #21: + 0x76db (0x7f81ae1696db in /lib/x86_64-linux-gnu/libpthread.so.0)
frame #22: clone + 0x3f (0x7f81ade9271f in /lib/x86_64-linux-gnu/libc.so.6)

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.