simpledet
simpledet copied to clipboard
batch image detection test
loader = Loader(roidb=roidb,
transform=transform,
data_name=data_name,
label_name=label_name,
batch_size=2,
shuffle=False,
num_worker=4,
num_collector=2,
worker_queue_depth=2,
collector_queue_depth=2,
kv=None)
I set batch_size 2 in detection_test.py of loader, config is retina_r50v1_fpn_1x, model can give true batch detection result (r) . but config is tridentnet_r50v1c4_c5_1x , get following error.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/imdl/Desktop/pycharm-2019.1.1/helpers/pydev/pydevd.py", line 1741, in
Because during training tridentnet creates two separate data providers for landscape and portrait images. During testing everything is taken from one iterator, since batch size = 1 it doesn't matter. You can't combine images with different dimensions inside one batch.
ps. batching images during inference usually doesn't improve performance.