Posts

Showing posts from August, 2022

Video Processing Pipeline

Image
 This week I was developing a pipeline to apply the pretrained models to a video. As a reference point, a library written by my ex-colleague was used. The pipeline is represented by two classes: VideoProcessor - which inherits from the OpenCV VideoCapture and allows applying several transformation functions to the video frame by frame ProcessedWriter - which uses the VideoProcessor and combines it with OpenCV VideoWriter Results of the pipeline are surprisingly good. For example, on the screens below you can see some frames from the processed video                                                                                                         

Inference for surgical tools detection

Detection.   This week I was writing the inference script for surgical tools detection model and creating a classification model (similar to the one used to solve the entrance exercise). The inference for Roboflow models is very simple, but I had to read the docs carefully in order not to invent the wheel. The issue for Roboflow inference is that it does not work with pathlib Path objects. This bug does not seem to be obvious, so I had to spend quite enough time to find it.  Also it turns out that the model is well optimised for runtime, so no additional transformation (to ONNX or TensorRT) were needed. Classification.   For classification I was using the same approach as for the entrance test. Notebook with experiments and the inference will be published soon.