C-3-Framework icon indicating copy to clipboard operation
C-3-Framework copied to clipboard

about processed data

Open xwjBupt opened this issue 5 years ago • 5 comments

hi!First of all ,thanks for your subtle framework!!but i have some questions,

  1. 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 avatar Apr 15 '19 02:04 xwjBupt

@xwjBupt I find the Same Problem. Images' size stay same . That's why the run train.py got problem of dimensions matching.

SJLNNU avatar May 30 '19 13:05 SJLNNU

@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.

SJLNNU avatar May 30 '19 13:05 SJLNNU

This is not a bug, because the author uses Python2.

Ethanwl avatar May 31 '19 01:05 Ethanwl

This is not a bug, because the author uses Python2.

Your right I am changing it .

SJLNNU avatar May 31 '19 06:05 SJLNNU

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?

haoranD avatar Nov 30 '19 08:11 haoranD