dmburd / s-dcnet Goto Github PK
View Code? Open in Web Editor NEWUnofficial Pytorch implementation of S-DCNet and SS-DCNet
Unofficial Pytorch implementation of S-DCNet and SS-DCNet
Hi,
thanks for sharing the code, but I find that there are some differences.
In your code, you sum the GT density map as the GT count. But in the original testing code provided by the xhp, the GT count is obtained from GT_mat.
#xhp
gt_count = mat['all_num']
# your code
gt_count = sample['dmap'].numpy().sum()
These two values are different. For example, the count num of IMG_1.png in SHB testing set is 23, but the sum of density map is 22.32398.
This will lead to the deviation of MAE and MSE.
batchsize default is 1,Set batchsize:8 -->>loss err
loss.py", line 31, in upsampling_loss
U1_gt = count1_gt / F.conv_transpose2d(count0_gt, krn, stride=2)
RuntimeError: Given transposed=1, weight of size [8, 1, 2, 2], expected input[8, 1, 6, 8] to have 8 channels, but got 1 channels instead
Hi,
Last time I have successfully run this code. Just curious if u have tried on convert it to tensorrt using torch2trt. Coz i have tried but encounter an error seems like due to weight of this model. But i am not sure about that. Have u tried on this? Thank you.
Hi, I'm running inference.py using your trained checkpoints (due to tight schedule for demo) based on our local camera. However, I got runtimeError: Gpu out of memory. I will share my code with you. Thanks a lot for giving your time.
Can we use for our own dataset? Please comment if possible. The research community will be thankful to have your step wise suggestions for new datasets. Thanks
Hi,
I've successfully run your code last time. However, I have a question, this code is applying SDCNet right? How about SSDCNet? Do you include the model in this code github?
Thank you.
Can I train this model with multiple GPUs?
I checked your density map. And they are so different from original. Is this reason that error rate is higher the original paper?
Hi,
I encounting an error when increase the batch size, example(1>4);
but training with batch size=1 seems ok at the moment.
what might possible wrong about this? thank you
]
Traceback (most recent call last):
File "train.py", line 359, in
main()
File "/home/alex/.local/lib/python2.7/site-packages/hydra/main.py", line 24, in decorated_main
strict=strict,
File "/home/alex/.local/lib/python2.7/site-packages/hydra/_internal/utils.py", line 174, in run_hydra
overrides=args.overrides,
File "/home/alex/.local/lib/python2.7/site-packages/hydra/_internal/hydra.py", line 86, in run
job_subdir_key=None,
File "/home/alex/.local/lib/python2.7/site-packages/hydra/plugins/common/utils.py", line 109, in run_job
ret.return_value = task_function(task_cfg)
File "train.py", line 355, in main
trainer.train()
File "train.py", line 241, in train
upsampling_loss = loss.upsampling_loss(sample_counts_gt, U1, U2)
File "/home/alex/crowdcount/SDCNET-withtrain/S-DCNet/loss.py", line 31, in upsampling_loss
U1_gt = count1_gt / F.conv_transpose2d(count0_gt, krn, stride=2)
RuntimeError: Given transposed=1, weight of size 4 1 2 2, expected input[4, 1, 6, 8] to have 4 channels, but got 1 channels instead
Hello,
Thank you for your prompt assisting while helping solving the previous issue.
Now, I got some error while do training. Attached is the traceback. Thanks
traceback_train.txt
I wan to train on less number not 1000 from where i can change it ??
I want to chance the batch size but I take an error. (RuntimeError: Given transposed=1, weight of size [2, 1, 2, 2], expected input[2, 1, 6, 8] to have 2 channels, but got 1 channels instead)
Could you help me please?
Hi,
Thanks for sharing this code. I got the following error while running the command: python gen_density_maps.py dataset=ShanghaiTech_part_B
one_head_gaus_subset / np.sum(one_head_gaussian) ValueError: operands could not be broadcast together with shapes (42,847) (42,0) (42,847).
the environment:
python : 3.6.10
pytorch : 1.3.1
torchvision : 0.4.2
numpy : 1.18.4
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.