Make AI While the Sun Shines

A number of factors have combined to give rise to an energy crisis in many parts of the world in recent times. With gas prices hitting record highs and supplies dwindling, interest in alternative sources of energy is heating up. One of the technologies that is getting another look is solar energy panels. These panels may not be able to supply all of the world’s energy needs at present, however, they are more efficient than they have ever been. And considering that solar energy is the most abundant source of energy on the entire planet, it would certainly seem deserving of our consideration.

Anyone with a bit of experience in solar technology knows that the panels are not some sort of magical free energy generator, however. They require substantial maintenance in order to operate at their peak efficiency level. This maintenance includes frequent, labor-intensive, manual inspections performed by trained technicians. And since problem areas can be very subtle in some cases, even these inspections may fail to reveal all of the efficiency-impacting issues. Even microscopic fractures on the glass surface of the panels can reduce their effectiveness. When the area that needs to be inspected is a large-scale solar farm, the cost of maintenance can be very substantial.

High-level overview of the project

Never one to shy away from a problem, Manivannan Sivan has developed a proof of concept device that automatically locates potential maintenance issues with solar panels in a snap. He used Edge Impulse to design a machine learning algorithm that can rapidly identify cracks in a large solar panel. Such a system could continuously monitor solar arrays, enabling defects to be detected immediately, and letting workers focus on real problems rather than spending their days searching for the proverbial needle in a haystack. Sivan also notes that with a bit more work, his device could even be installed on a drone or self-driving robot to allow it to cover an entire solar farm.

The machine learning model was heavily optimized by Edge Impulse for use on edge computing devices, so Sivan was able to use an Arduino Portenta H7 board to run the algorithm in a compact and energy-efficient manner. A Portenta Vision Shield was included in the build to give sight to the solar panel inspection device. These two inexpensive, off-the-shelf components were all that was needed to complete the hardware design. Sivan also tracked down some solar panels so that he could capture data to train the model.

The data collection setup

Speaking of training, Sivan set the Arduino up in front of a solar panel that had several cracks in its surface. He then flashed a custom firmware image that he downloaded from Edge Impulse to the board. This linked the board to his Edge Impulse project, and as the Arduino captured images, they were automatically uploaded. After all of the training images were collected, the labeling queue tool was used to draw bounding boxes around each crack. This is the information that will teach the model to recognize cracks when it sees them in new panels that it has not previously examined.

Adding labels to the training data

A simple impulse was designed that preprocesses the uploaded images by resizing them and converting them to grayscale. This initial step reduces the computational workload that will be required by algorithms later on in the pipeline. The processed images were then fed into a learning block that detects objects using Edge Impulse’s ground-breaking FOMO algorithm. This algorithm allows object detections to be performed at a very high frame rate, yet with very low utilization of resources — this makes it perfectly suited for deployment on microcontrollers.

The training algorithm completed within a few minutes to reveal an object detection accuracy of 85.7%. As a more stringent test, another dataset that had been held out of the training process was used to validate the model. In this case, 77.8% accuracy was observed. While this result is quite good for a quick proof of concept, Sivan noted that the model had some difficulty distinguishing between cracks and the normal boundaries between solar cells in some cases. This situation would most likely be resolved by capturing additional training data from more angles and under different lighting conditions.

The object detection impulse

Pleased with the result, Sivan deployed the model to the physical hardware so that cloud compute resources and wireless connectivity would not be needed for the solar panel defect detector to operate. The Portenta H7 is fully supported by Edge Impulse, so a firmware image created specifically for this board was downloaded using the deployment tool. After flashing the image to the Arduino, Sivan was able to test the completed device out and verify that it was working exactly as he expected it to.

Model testing

What are your big ideas to help solve the ongoing energy crisis? Reading through the project documentation might just give you the information that you need to bring your ideas to life.  You can also clone Sivan’s Edge Impulse project to jumpstart your own creation.


Want to see Edge Impulse in action? Schedule a demo today.

Subscribe

Are you interested in bringing machine learning intelligence to your devices? We're happy to help.

Subscribe to our newsletter