Artificial Intelligence and Machine Learning
by Devesh Saraswat on April 1, 2019
Machine Learning, Artificial Intelligence, Image Processing are not just mere words anymore. They have occupied a major interest in the Technology world and are being used extensively in numerous sectors like Health & Medical, Engineering, etc. With the same pace, it has occupied its space in Agriculture Domain.
In agri trading, traditional methods have been used regarding the quality testing of the commodity. Agribazaar — India’s foremost AgTech platform for transforming agri trading saw the potential of Image Processing and Machine Learning and utilized its power to solve one of its major problems that come up with Online Commodity Trade, that is Fast Pace Commodity Testing.
As the saying goes “Things told look easier than done”, the same came true in this case. Below are the glimpses of our Journey from mere Concept to a whole new Live Feature.
Commodity Testing Via Mobile App (In a Single Click)
Day 1: Idea Generation
The best time when ideas come up are “Random Discussions” and the same happened with this one. In a Daily Scrum, the idea of “Commodity Testing via Mobile App” came up and it was decided to give it a try. Just like any other process, a team was formed and the task was assigned for the product, to begin with, timelines.
Week 1: Lots and Lots of Discussions
Concept — It was made clear that we need a Mobile App which allows the user to test the commodity and get results in just a click of commodity image.
Where to Start? — “A journey of a thousand miles starts with a single step”, but how to begin with that step was the Tricky Part. (Commodity Market is Vast)
To start with, we decided to pick 3 commodities — Channa, Soya and Jeera.
The quality parameters were finalized which could be tested via the App as it had its own limitation that only Physical Parameters could be tested via Images Processing.
Week 2: The Development Started
The best minds were put to work and Machine Learning, Image Processing with Android and IOS Development came into the picture. The algorithms were designed and a long queue of codes was written.
Week 3,4,5….. : Here Comes the Problem!
Count and Grain Size — The ML algorithm worked fine for commodities with sizes like Potato or Tomato etc, but as soon as we moved to cereals and pulses,the grain size became a road blocker. Due to the overlapping of grain particles, the result count was wrong.
Color and Lights — For all the images captured, the results were different in different light conditions and it was difficult to figure out whether the sample is immature or healthy or broken, etc. Hence, the distance from where the image was captured became a problem statement as well.
Week 13: Lucky Number!
The Count and Grain Size Problem:
We tried multiple Machine Learning algorithms available in the market but none could resolve our problems which led us to come up with our self-built algorithms for the ML system.
Process: At first, commodity grains were placed on a plain base with each grain placed at a little distance from another and the result count started to come correct. But realizing that this will not be the ground reality it was required to dig deeper into Image Processing. After a thorough R&D, our ML system was finally able to count the particles even when they are in close proximity but at least not overlapping.
The Color and Lights Problem:
On realizing that the light conditions can never be the same and the distance from which the image is captured can vary, the only option was to train our model really well.
Process: Hundreds and thousands of sample images were captured in different light conditions from different angles to train our model. Finally building the algorithm around the same helped us achieve results which were 70% accurate.
While finding the solutions to the problems was time taking, we finally ended up with working results and a Live feature in our App.
As the saying goes “Learning Never Ends”, so does the belief that there is a lot that can be done using the Power vested to us by Technology and we are working on getting better and better.
(Note: Shadow and lighting effect in the images captured are still the problems to which we are trying to find the answers and we’re always open to solutions that could help us get better!)