Hydroponics Robot Part 6 – Polygon Object Detection

Hi everyone,

It’s been a while since I’ve posted an update on the the hydroponics robot but I’m definitely still working on it! I’m currently working on aligning the robot’s pot lift with “catches” on the plant pots.

I’ve tried a few approaches for this one, but the current plan is to use polygon object detection in order to generate rotated bounding boxes.

I’ve used standard bounding boxes with Pytorch as well as Tensorflow a few times. Thankfully these are fairly easy to setup, however they do not provide any information on rotation which can make exact locations difficult to calculate.

For example, see the image below (from stackoverflow).

The first rectangle is highlighted in red with a standard bounding box. The second rectangle uses a “rotated” bounding box and provides a much clearer indication of the rectangles exact location.

I tried a lot of different solutions in order to try and get this working. Eventually, I came across this repository here: https://github.com/XinzeLee/PolygonObjectDetection

Using Google Colab and little bit of tinkering created a detector that provided me with an accurate location of my pot hooks within the robot’s camera frame.

Below is the output from processing a real image taken from the robot. The detector has correctly highlighted both the left (yellow) and right (red) pot hooks and drawn a rotated bounding box around each.

Now that I’m able to determine where the pot is located I am moving on to getting the robot to adjust its location. Ideally, I will be able to move the robot’s lift mechanism directly under the hooks and then lift the pot.

Anyway, that’s all from me for now – I’ll post another update once this part is all working!