In order to train our AI-model we need a lot data, but in order to have the correct data, we also need bananas. Being IT people, we never thought of using actual bananas, but instead had a hotel employee in a suit deliver 20 a3 pages of printed bananas that we cut out and glued to pieces of cardboard. Compete with their individual banana stands:
We then placed the bananas in the road around the hotel, got in the car and drove around filming the road from the dashboard inside the car. The conditions were quite foggy and bad, but the enthusiasm was electric. We ended up with a lot of footage including some of a consenting dog and owner.
We then started feeding all the videos to our model, mining for frames that contained actual bananas – our gold.
This is done in a jupyter notebook in python. The first thing the model does is identify all frames that contained potenital bananas, and singling them out. We ended up with over 10 000 potential banana frames. This is one of them with an obvious banana:
The model then strips away everything that is not a banana, in order to get the precise location of the banana:
Furthermore the model does a cutout of the frame around the banana which ends up being used in our actual dataset giving the banana detection app an excellent base and understanding of how to identify bananas.
Actual video from the training data:
Video of banana making:
Photo gallery of Herman and Erik placing bananas and driving around filming the bananas.