Internship Report 2018 (2/3)

Plank Segmentation Model

The next project I’m going to tell you about is a model to segment wooden planks inside of machines or an industrial environment. This information can be used to improve many control problems in sawmill machines that currently have to be addressed with traditional sensors. For this model I would have liked to implement an oriented version of YOLO v3 but due to time constraints in the end I essentially used the same approach as for the log segmentation.

DeeplabV3 Encoder

During manual segmentation of the training data we used oriented rectangles instead of polygons to speed up segmentation and to be able to implement the more efficient localization approaches in the future. Since all regular planks extend from the upper to the lower end of the image and we were not able to draw rectangles extending this far, they were extended out of bounds of the image in preprocessing. Then all images were scaled to half their original size and augmented just like in the log segmentation training but with a higher variance of brightness and noise. Finally in this model there was no need to mask any output or loss since the whole image is relevant to our estimation. The MobileNetV2 backbone was sufficient to achieve visually good results at a high resolution and the inference time lies below the aimed maximum. At this size the memory consumption is considerable and allows only for a small batch size, but also provides more details to the model. Part of the requirements was, that beams stretching through the image area were to be ignored by the model in order to track planks even when they are partly covered. The model succeeded to learn this quite quickly. To simulate different beam positions with the limited data available we cropped flipped and stretched the images in all kinds of ways which we would have done anyway in order to prevent overfitting. One minor problem with the dataset was that all images were slightly distorted by the fisheye camera, such that we could not exactly cover the bent planks with the straight oriented rectangles but through careful manual segmentation we mitigated this quite well and the resulting error is barely noticeable in the results. Have a look yourself:

Plank Segmentation Result 1Plank Segmentation Result 2