fundamentalvision / Deformable-DETR

Deformable DETR: Deformable Transformers for End-to-End Object Detection.
Apache License 2.0
3.2k stars 520 forks source link

Is there a inference file? #33

Open PGDneedoffer opened 3 years ago

PGDneedoffer commented 3 years ago

Is it convenient to provide reasoning files?

ahmed-nady commented 3 years ago

I did demo.py to run the inference on a single image and visualize the results on it. you can get it at https://github.com/ahmed-nady/Deformable-DETR

olivierp99 commented 3 years ago

hello @ahmed-nady could you tell me what inference speed do you have and with what gpu?

thanks in advance

ahmed-nady commented 3 years ago

Inference speed on image size provided in the code (800) is 110 ms roughly and the GPU used is Tesla V100-SXM2

swlfsj commented 3 years ago

代码(800)中提供的图像大小推断速度大约为110毫秒,所使用的GPU为Tesla V100-SXM2

please to ask How could I add class tags and prediction probability to the prediction box, thanks

ahmed-nady commented 3 years ago

In demo.py line 182, you can set the wanted threshold as keep = scores[0] > 0.35. For class tags, line 184 provides you with tags of detected objects labels = labels[0, keep]. Also, you can filter the unwanted class. For the size of the input image, you can change it as required as in line 134, for example, this instruction makes your input be in size 800T.Resize(800)

aviadlazar commented 2 years ago

@ahmed-nady When I run demo.py I get the following message: error in ms_deformable_im2col_cuda: out of memory.

This error never appears during training or when I evaluate on epoch end, have you encountered this?