More experiments with bounding boxes and refactoring
This week I was mostly doing refactoring of my code and experiments.
Refactoring
First of all I made the segmentation inference pipeline more felxible by using inheritance for dataset classes and making sure that my onnx runtime works identically for both binary and multi class segmentation models. Then I have committed these changes.
Experiments
Secondly, this week I was trying to redistort bboxes using a method from OpenCV forum. The idea was simple: I have applied the distortion to a chessboard image, calculated the camera matrix and distortion matrix and then put them to the formula.
Chessboard before distortion |
Chessboard after distortion |
Then I have applied a technique for camera calibration. And got the following representation:
Distorted chessboard with corners |
After that I had distortion and camera matrix for my images. I have simply hardcoded them and applied to surgical tools dataset. The resulting distortion was not that strong, but coordinates of bounding boxes have changed.
As a result, I have got the following transformation of bounding boxes
Training a detection model
I start training a detection model, but it turned out that I run out of quota on Kaggle, since I was participating in a competition. That is why training failed. I will resume it when the quota is renewed.
Comments
Post a Comment