The SkyProject – a custom model of sky pictures with OCI AI Vision

white and gray robot walking on wooden surface
Photo by Kindel Media on Pexels.com

Some time ago, while in the role of a Solution Engineer, I had a customer from the agriculture industry with a very interesting use case. He wanted to have an automated process to identify when some of the leaves were showing signs of disease or anything affecting their health.

The idea was to have pictures taken from the leaves and once a positive detection was made then they could take preventive actions to try and revert the situation.

But how would this work from a technology point of view? The answer was an OCI AI Vision custom model. Obviously, there were other components in terms of taking the pictures and uploading them for analysis, but the core technology was indeed on the OCI side.

Vision provides custom image analysis models that allow you to locate and tag objects, text, and entire scenes in images, that are specific to your scenario. Simply create a labeled dataset, instruct Vision to train a model using the labeled dataset, and call the custom model to evaluate new images.

Data Labelling

We need a labeled dataset, this is, uploaded pictures where we label them accordingly. Let’s pick up a slightly different scenario, one where we upload pictures of the Sky and label them with “Clouded”, “Partially Clouded”, “Blue Sky” and “Fully Clouded”.

The dataset has 178 pictures, all of them labeled accordingly.

OCI AI Vision custom project

Now we can create a custom project in OCI AI Vision, where we choose the type of Image Classification, and pickup the previous dataset.

Training the model was quite fast. (not the advertised 24 hours)

Analyze

And now we are ready to test it. I upload some pictures that are not part of the training set (obviously)

So far it seems that the better labels one has the better the results. I have a couple of labels (Clouded and Fully Clouded), that probably is too much overlapping and that may complicate the analyses.

I have another project running on a raspberry pi that takes a daily picture of the sky. I may use this to test it out, but I am sure the dataset needs a better treatment, with more accurate labels. Probably will start with Blue Sky and Clouds and work it from there.

Unfortunately, Heroku no longer supports free pages, so for now, all of this will be local 🙂