Deployment of a PyTorch computer vision deep learning model into a windows desktop app
I have trained a yolov3 model in PyTorch with my dataset and I also have written some utility codes for it that run alongside the model all in python language. Now I want to deploy this model and my utilities into a windows desktop app that takes a video and runs the model on its frames. How can I do this task with minimum change in my code or rewrite it in another language? What framework is the best option for designing the UI of the app?
Thanks.


I would first use your model with PyTorch to detect each frame and use numpy ImageDraw to draw around your object(to be detected). Here is an article on this: Drawing a rectangle inside a 2D numpy array

Then I would use OpenCV(cv2) to append all the frames together to make a video you could also use ffmpeg. Here is a article on this(OpenCV): How to make a movie out of images in python

Then for your UI framework you could use PyQt5 to display your video: Load an opencv video frame by frame using PyQT. But you could also use Kivy with Gstreamer: Kivy VideoPlayer fullscreen, loop, and hide controls

Finally to turn your .py file into a .exe(executable for windows) I would use PyInstaller for that: http://www.pyinstaller.org/


