Wovchena / text-detection-fots.pytorch

FOTS text detection branch reimplementation, hmean: 83.3%
79 stars 21 forks source link

about training image size format #22

Open BENHSU0723 opened 3 years ago

BENHSU0723 commented 3 years ago

Accroding to previous issue before and setting of IN_OUT_RATIO = 4 and IN_SIDE = 640 , so i think that the training image format shound as same as ICDAR2015, right? because i have trained with some image with different size, then i got this error

File "C:\Users\VMlab\Desktop\text-detection-fots.pytorch-master\datasets.py", line 76, in transform
    torch.randint(low=0, high=(stretched.shape[0] // IN_OUT_RATIO) - OUT_SIDE, size=(1,), dtype=torch.int16).item())
RuntimeError: random_ expects 'from' to be less than 'to', but got from=0 >= to=-3

thanks for your reply @Wovchena

Wovchena commented 3 years ago

Correct. The error on high=(stretched.shape[0] // IN_OUT_RATIO) - OUT_SIDE suggests that stretched.shape[0] can't be smaller than OUT_SIDE.