C-3-Framework
C-3-Framework copied to clipboard
about processed data
hi!First of all ,thanks for your subtle framework!!but i have some questions,
- in code,for example in datasets/SHHA/pre_data.py,you resize the imgs' size so that they can be divided by 16 and save to the dstRootAttr,but after i download the processed data you provided in readme,i found that the imgs' size are not divisible by 16?
2)what is these code for?
dst_wd= wd/16*16
rate_wd = float(dst_wd)/float(wd)
dst_ht = ht/16*16
rate_ht = float(dst_ht)/float(ht)
gt_x = (gt[:,0]*rate_wd).astype(np.int64)
gt_y = (gt[:,1]*rate_ht).astype(np.int64)`
why should gt_* multiply rate_*? thanks a lot!!
@xwjBupt I find the Same Problem. Images' size stay same . That's why the run train.py got problem of dimensions matching.
@xwjBupt @gjy3035 I think its becouse of the difference between python3 and python2(thanks to @Elin24 ) :
dst_wd= wd/16 *16 rate_wd = float(dst_wd)/float(wd) dst_ht = ht/16 *16 rate_ht = float(dst_ht)/float(ht)
change to
dst_wd = int(wd/16) *16 rate_wd = float(dst_wd)/float(wd) dst_ht = int(ht/16) *16 rate_ht = float(dst_ht)/float(ht)
it will work.
This is not a bug, because the author uses Python2.
This is not a bug, because the author uses Python2.
Your right I am changing it .
Hi, thanks for your excellent discussion.
When I run the train.py for SHHA datasets, I got a dimension error. But only happened when I run for SHHA datasets.
RuntimeError: The size of tensor a (376) must match the size of tensor b (377) at non-singleton dimension 1
Can you please give me a suggestion?