Open nemtiax opened 4 years ago
I think this problem shouldn't happen given that you specify the input_size=target_size
when calling detect_imgSeq
. Could you check if your target_size
is None
?
https://github.com/duanzhiihao/RAPiD/blob/c6fabcf5527bf0fca64a2d3b197d1c2822f22fb5/train.py#L227
Moving the initialization of input_size and conf_thres to the top of the init method resolved the issue for me, but I'm not sure if that's really the root cause, or if I'm just patching over some other problem (like maybe these are intended to be set elsewhere, and that's not working).
This should work fine and cause no other problems.
I think my target_size is being set here:
https://github.com/duanzhiihao/RAPiD/blob/c6fabcf5527bf0fca64a2d3b197d1c2822f22fb5/train.py#L41
Which should propagate down to the call to detect_imgSeq. I'll add some debugging outputs and verify whether it's actually getting there, though.
It turns out that there is a bug in the api.py. I fixed it and it should work now. Could you try again and tell me if your problem resolved?
I'm getting this error when training on COCO gets to the first evaluation step:
I think the reason this happens is that when a Detector is initialized for evaluation, it gets passed a model:
https://github.com/duanzhiihao/RAPiD/blob/c6fabcf5527bf0fca64a2d3b197d1c2822f22fb5/train.py#L226
If we look at Detector's init method, it sets self.input_size and self.conf_thres on lines 43-44, but if you pass a model, it will return on line 27, so input_size and conf_thres are never initialized.
Moving the initialization of input_size and conf_thres to the top of the init method resolved the issue for me, but I'm not sure if that's really the root cause, or if I'm just patching over some other problem (like maybe these are intended to be set elsewhere, and that's not working).