Giter VIP home page Giter VIP logo

gcc-sfcn's Introduction

Hi there, I'm Junyu Gao

  • 🔭 I’m currently a Ph.D candidate of Center for Optical Imagery Analysis and Learning (OPTIMAL) in NWPU.

🤝🏻  Connect with Me

Email    HomePage

gcc-sfcn'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  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  avatar  avatar  avatar  avatar  avatar

gcc-sfcn's Issues

SystemError

from .resSFCN import resSFCN as net
SystemError: Parent module '' not loaded, cannot perform relative import

Where Can I Find PreTrain model for "CrowdCounter"

Hi ,
I am using test.py with (torch 1.0 python 3.5.4 ),after i changed the model path to downloaded "Pretrained_GCC.pth" .It seems this pth's state_dict mismatchs CrowdCounter. Where Can I find the right pretrain pth for CrowdCounter? or Did i miss things?Please let me know.

RuntimeError: CUDA error: out of memory

Hello, I was training because the computer has only one gpu0 reason to fail, and I have been on a tight schedule recently, and I want to run the test directly. Can you email me the model(all_ep_178_mae_74.1_mse_131.0.pth) you need for the test?The model is the line 36 in test.py.Thanks!

SSIM loss

Hi,thanks for your nice work. Could you show me where is the SSIM loss in the code?

flops and params of the model ?

Hello, have you counted the number of parameters and flops of this model?I want to count these two parameters to see if I can use this model on the embedded platform, but I have some problems. @gjy3035

Why divide predicted result by 100 in test.py?

Hi, many thanks for your work.

I noticed that when doing forward prediction in test.py, result from network will be divided by 100.0:
pred = np.sum(pred_map)/100.0

This confuses me because I don't see any division like this in loss definition in train.py or CC.py. Do you use different processed groundtruth data for training and validation?

When I want to train with my own data set, I get the following error

When I want to train with my own data set, I get the following error
D:\Program Files\Anaconda3\envs\lei\envs\py36-pytorch\python.exe" D:/zgy/GCC/GCC-SFCN-master/train.py
Traceback (most recent call last):
File “D:/zgy/GCC/GCC-SFCN-master/train.py”, line 250, in
main()
File “D:/zgy/GCC/GCC-SFCN-master/train.py”, line 100, in main
i_tb = train(train_loader, net, optimizer, epoch, i_tb)
File “D:/zgy/GCC/GCC-SFCN-master/train.py”, line 120, in train
for i, data in enumerate(train_loader, 0):
File “D:\Program Files\Anaconda3\envs\lei\envs\py36-pytorch\lib\site-packages\torch\utils\data\dataloader.py”, line 286, in next
return self._process_next_batch(batch)
File “D:\Program Files\Anaconda3\envs\lei\envs\py36-pytorch\lib\site-packages\torch\utils\data\dataloader.py”, line 307, in _process_next_batch
raise batch.exc_type(batch.exc_msg)
AssertionError: Traceback (most recent call last):
File “D:\Program Files\Anaconda3\envs\lei\envs\py36-pytorch\lib\site-packages\torch\utils\data\dataloader.py”, line 57, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File “D:\Program Files\Anaconda3\envs\lei\envs\py36-pytorch\lib\site-packages\torch\utils\data\dataloader.py”, line 57, in
samples = collate_fn([dataset[i] for i in batch_indices])
File “D:\zgy\GCC\GCC-SFCN-master\datasets\UCF_QNRF.py”, line 40, in getitem
img, den = self.main_transform(img,den)
File “D:\zgy\GCC\GCC-SFCN-master\misc\transforms.py”, line 16, in call
img, mask = t(img, mask)
File “D:\zgy\GCC\GCC-SFCN-master\misc\transforms.py”, line 50, in call
assert img.size == mask.size
AssertionError

SHHA train

result in the paper of shanghaitech partA is 64.8/107.5 can you give me the code of this part or some setting of your experiment .i have run the code of C-3 resnet50 but i got partA 77.3/124.5 with batchsize=6
crop image size of batch min size

python and pytorch version

Can this program can run in python3.6 and pytorch1.0.1?And I want to use VGG16 as the skeleton.Is that feasible?

Cannot reproduce the results for SHTA and UCF-QNRF dataset with cyclegan translated images

Hello Junyu
I try to translate images with the CycleGAN code you provide with the filtered synthetic images for each real dataset. But the results I get (mae or mse) is even worse than the results given by the model trained with the original images. Could you provide the transferred images. And it would be great if you can provide all the code, parameters and input images to train CycleGAN.

Paper online?

Is pdf of the paper available? I couldn't find it.

The pretrained model is not in accordance with resSFCN

The len of pretrained model's state_dict is 488 and that of resSFCN is 582.
If I want to finetune the model, what the details should I notice? For example, in shanghaiB, how to preprocess images and how to set optimizer?

Runtimeerror

Runtimeerror:Error(s) in loading state_dict for ResNet:
Missing key(s) in state_dict:
Unexpected key(s) in state_dict:
I have encountered the above problem.Weight and residual network do not correspond.

Training time?

Can I know how much time will it take to train the SOTA? Thanks!

Final model for the ShanghaiTech B dataset

Would it be possible for you to release the final model trained on the shanghaitech B dataset? I wanted it to evaluate some of my own images on a custom dataset. Thanks!

IndexError happend in training

Hi,Thanks for your sharing.I met a problem as follows when i run train.py
train.py:125: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad():instead. img = Variable(img, volatile=True).cuda() train.py:126: UserWarning: volatile was removed and now has no effect. Usewith torch.no_grad(): instead. gt_map = Variable(gt_map, volatile=True).cuda() Traceback (most recent call last): File "train.py", line 205, in <module> main() File "train.py", line 81, in main validate(val_loader, net, epoch, restore_transform) File "train.py", line 141, in validate gt_count_tmp = gt_count[i_img] IndexError: index 1 is out of bounds for axis 0 with size 1

This happend in validate(),is there something wrong in this function? I have print the gt_count.shape,it equals to (1,),and pred_map.shape equals to (768,1024),and i don't understand why use gt_count_tmp=gt_count[0] in line 141 of train.py.
Thanks for your reply.

RuntimeError: CUDNN_STATUS_INTERNAL_ERROR

Hi, I was running test.py on single GPU but got this error. Do you know what is wrong? Thank you so much.

Ubuntu 16.04
python 2.7
pytorch 0.4.0
CUDA 9.0
CUDNN 7.0

Traceback (most recent call last):
  File "test.py", line 185, in <module>
    main()
  File "test.py", line 54, in main
    test(file_list[0], model_path)
  File "test.py", line 111, in test
    pred_map = net.test_forward(img)
  File "/home/work/zhanghaoxu/GCC-SFCN/models/CC.py", line 43, in test_forward
    density_map = self.CCN(img)            
  File "/software/conda/envs/zhanghaoxu/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/work/zhanghaoxu/GCC-SFCN/models/resSFCN.py", line 44, in forward
    x = self.frontend(x)
  File "/software/conda/envs/zhanghaoxu/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/software/conda/envs/zhanghaoxu/lib/python2.7/site-packages/torch/nn/modules/container.py", line 91, in forward
    input = module(input)
  File "/software/conda/envs/zhanghaoxu/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/software/conda/envs/zhanghaoxu/lib/python2.7/site-packages/torch/nn/modules/container.py", line 91, in forward
    input = module(input)
  File "/software/conda/envs/zhanghaoxu/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/software/conda/envs/zhanghaoxu/lib/python2.7/site-packages/torchvision/models/resnet.py", line 83, in forward
    out = self.conv2(out)
  File "/software/conda/envs/zhanghaoxu/lib/python2.7/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/software/conda/envs/zhanghaoxu/lib/python2.7/site-packages/torch/nn/modules/conv.py", line 301, in forward
    self.padding, self.dilation, self.groups)
RuntimeError: CUDNN_STATUS_INTERNAL_ERROR

How can I use the GCC dataset in my training process?

Hello, I tried to download the GCC dataset from your project website but I failed.
How can I get the GCC dataset ?
And, I want to use it as the pretrain dataset for my model, how to deal with the data?
Thanks a lot ~
Best wishes.

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.