zylo117 / Yet-Another-EfficientDet-Pytorch

The pytorch re-implement of the official efficientdet with SOTA performance in real time and pretrained weights.
GNU Lesser General Public License v3.0
5.2k stars 1.27k forks source link

The speed and memory problem on Jetson Xavier NX #415

Open MuhammadAsadJaved opened 4 years ago

MuhammadAsadJaved commented 4 years ago

Hi, We are running EfficinetDet network on Jetson Xavier NX ( https://developer.nvidia.com/embedded/jetson-xavier-nx)

While running demo we are facing two problems

1- The FPS is very low 4 ~ 5. 2- The memory usage of NX is fluctuating too much. sometimes 0% , sometimes 99%. Please see the attached image.

What is the possible reason?

We are using CUDA 10.3 PyTorch 1.6.0 and other requirements are same as mentioned in the repo.

effinet

zylo117 commented 4 years ago

I think pytorch is not meant for embedded devices. You should try to convert effdet to a static model and try again.

MuhammadAsadJaved commented 4 years ago

@zylo117 Thank you for suggestions. Is there any sources or project how we can convert and implement static models in NX? Any specific recommendations?

zylo117 commented 4 years ago

try onnx to make it static and tensor RT to make it faster.

MuhammadAsadJaved commented 4 years ago

@zylo117

OK. Thank you so much sir.

MuhammadAsadJaved commented 4 years ago

@zylo117 Sir we have converted EfficientDet model to ONNX and TensorRT.

But now the problem is they have examples/samples to run only state of the art methods like SSD and YOLO etc. Your method is new so there is no example or settings to run EfficientDet model in TensorRT. Do you have any idea or suggestions for that?

zylo117 commented 4 years ago

Sorry, I don't quite get what you said. Do you mean you managed to convert the model to tensorRT but it is not as fast as you expected because tensorRT is not optimized for effdet? In that case, I think that's the best Jetson can do for now.

anti-destiny commented 3 years ago

@MuhammadAsadJaved Hi, could you please give me more information about how you export the EfficientDet to TensorRT. I'm a hard time exporting this model. Any hint is appreciated, thanks.

fee0819 commented 3 years ago

@MuhammadAsadJaved Hi, could you please give me more information about how you export the EfficientDet to TensorRT. I'm a hard time exporting this model. Any hint is appreciated, thanks.

sorry,even if the model convert to ONNX ,but now when run the model also have some problem

kongyanye commented 2 years ago

I've successfully convert it to TensorRT version for inference. Kindly check it here: https://github.com/kongyanye/EfficientDet-TensorRT