tusen-ai / simpledet

A Simple and Versatile Framework for Object Detection and Instance Recognition
Apache License 2.0
3.08k stars 486 forks source link

[BUG] #257

Open aidandan opened 4 years ago

aidandan commented 4 years ago

when i detect one image using tridentnet_r101v2c4_c5_multiscale_addminival_3x_fp16.py and i download model tridentnet*,3x i got this error: self.p_long, self.p_short = transform[1].p.long, transform[1].p.short AttributeError: 'Resize2DImageByRoidb' object has no attribute 'p'

when i rewrite the code: self.p_long, self.p_short = transform[1].resize_aug.p.long, transform[1].resize_aug.p.short another error occur scale = min(self.p_short / short, self.p_long / long) TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

xmyqsh commented 4 years ago

@aidandan

self.p_long, self.p_short = transform[1].resize_aug.p.long, transform[1].resize_aug.p.short
scale = min(self.p_short / short, self.p_long / long) if self.p_short and self.p_long and short and long else self.p_short / short if self.p_short and short else self.p_long / long if self.p_long and long else None
aidandan commented 4 years ago

@xmyqsh so,how to do for this error. when i use TridentNet, 2x config,this was no error.

RogerChern commented 4 years ago

@aidandan Could you please include the full error log. I can not directly locate the problem without line numbers.