How we analyzed over 200,000 photos with almost 100% success rate

Visual inspection of products in a well-known manufacturing company. Work for several dozen workers. Results in a few months. Hundreds of thousands of dollars in costs and uncertain results. We’ve avoided that.

The client needed to streamline the image review process to eliminate defective parts from reaching the end customer.

After a brief consultation with our specialists, we presented the management with a proposal to streamline the entire project using modern technologies. The company liked the idea. Our offer had no competition. Neither in price nor in delivery time.

The “good old” algorithms have surpassed neural networks

We had a big challenge ahead of us, a lot of work and little time. We needed to analyse more than 200,000 photos for two different tasks. The first solution was to use neural networks. They are currently experiencing a huge boom. But there was no time to develop them and then learn them. The deadlines are relentless.

We started to analyze the whole project and in the end we bet on proven algorithms. They had several advantages for the project:

  • shorter development time,
  • better prediction of the time required for implementation,
  • easier prediction of program behaviour.

According to the results, we made the right decision. We implemented and delivered the entire image data recognition solution within a few days. The accuracy of our evaluation was an excellent 99.91 to 100%.

With minor modifications, the company can continue to use the developed algorithms and entire tasks after the end of this project.

Task 1 – comparing the shape of the part

We received sets of photos from the customer. The photos showed thousands of products in a time series. You’d look for differences under a magnifying glass. Our job was to determine which photos depicted different pieces and which depicted the same ones.

For resolution, we chose the structural similarity index measure (SSIM), which evaluates the structural similarity of two photos.

The algorithm is commonly used to compare completely different objects. We worked with the same pieces and those that differed only in detail. The interpretation of the resulting index had to be modified for our purposes. Evaluation and follow-up showed that our accuracy on different sets of photos was between 99.91% and 100%.

Task 2 – detection of identification codes on parts

In the second task, we had to detect 2D codes on the parts in the sets of supplied photos. We decided to use the average lightness of the parts of the photographs where the code may be present as an indicator for the classification of the photographs.

Zadání vypadá jednoduše, přesto jsme řešili několik problémů. Museli jsme občas mírně posunout kameru, která snímala produkty. Tím se změnil i úhel zachycení snímků. Jak asi tušíte, to mohlo výrazně zamíchat s přesností výsledků.

The assignment looked simple, yet we solved several problems. We had to occasionally move the camera that was capturing the products slightly. This also changed the angle of the images. As you can probably guess, this could significantly mess with the accuracy of the results.

In a week, it was done. The customer saved money and several months

This project showed the knowledge and experience of our IT specialists. They often take the project to the next level beyond the agreed cooperation.

The whole project was supposed to be very challenging. Dozens of employees were supposed to work on it for many months.

In about 5 working days we managed to deliver the entire solution and analyze over 200,000 photos. Under more favorable conditions and faster than the foreign specialized companies offered.

After this experience, we are happy to say that the potential for similar projects in industrial companies is truly enormous. Particularly in dealing with complaints and, most importantly, in preventing the problems associated with them.