I have created a machine learning software that detects objects(duh!), processes the objects based on some computer vision parameters and then triggers some hardware that puts the object in the respective bin. The objects are placed on a conveyer belt and a camera is mounted at a point to snap pictures of objects(one object at a time) when they pass beneath the camera. I don't have control over the speed of the belt.
Now, the challenge is that I have to configure a ton of things to make the machine work properly.
The first problem is the time model takes to create segmentation masks, it varies from one object to another.
Another issue is how do I maintain signals that are generated after computer vision processing, send them to actuators in a manner that it won't get misaligned with the computer vision-based inferencing.
My initial design includes creating processes responsible for a specific task and then make them communicate with one other as per the necessity. However, the problem of synchronization still persists.
As of now, I am thinking of treating the software stack as a group of services as we usually do in backend and make them communicate using something like celery and Redis queue.
I am a kind of noob in system design, come from a background of data science. I have explored python's multithreading module and found it unusable for my purpose(all threads run on single core). I am concerned if I used multiprocessing, there could be additional delays in individual processes due to messaging and thus, that would add another uncertainty to the program.
Additional Details:
- Programming Frameworks and Library: Tensorflow, OpenCV and python
- Camera Resolution: 1920P
- Maximum Accutuation Speed: 3 triggers/second
- Deep Learning Models: MaskRCNN/UNet
P.S: You can also comment on the technologies or the keywords I should search for because a vanilla search yields nothing good.