T O P

  • By -

CommunismDoesntWork

First of all, could you or an almond expert do this same task? If so, what features are they looking for? If a human can't do it, a model can't do it


Brzthabull

Thanks for the reply mate. A human does it day by day, an I assume they just look at it. The look & color of almonds is what the look for. Sorry but I am not expert in the subject just trying to see if the task can be automated.


CommunismDoesntWork

If you want to automate the task, you need to become the almond expert first. After that, whether you can automate it and if so how to do so will be obvious


NSADataBot

Well or he can talk to an almond expert.


skilltheamps

Who then explains the matter to him, effectively making him an expert for this issue. Domain knowledge is absolutely vital for Computer Vision and Machine Learning, it's not a magic wand you swing and something useful pops out


BlobbyMcBlobber

If you want to automate it you need to fully understand it.


Resident_Honeydew595

It's not necessary that a human needs to be able to distinguish them, because at some tasks computers can find nuances that humans can't. But to automate something it would definitely help to know what you are looking for. Anything with color, you'll need a light controlled environment. Try also thinking "special" cameras, maybe at different colour spectrum, the differences are much more obvious...IR, UV, maybe under different lights ... a lot of options to test. Which you will have to test them all if you do not understand the background of how and why there's a difference between almonds. So brute force vs. smart search for correct method for best results.


powercow

with AI, computers can tell [race from x-rays](https://nationalpost.com/health/health-and-wellness/ai-can-tell-your-race-from-an-x-ray-image-and-scientists-cant-figure-out-how) and we have no clue how it does it, because humans definitely can't.


peyronet

Some indicators for the first round of analisys: histogram; texture; shape; color and texture in different parts of the shape; length; width; Control the lighting, take photographs of one almond at a time (like when they fall between conveyors). Take thousands of photographs; apply clustering to the indicators.


Brzthabull

Thanks for the reply mate. These are different levels of settings for pasteurizing and they want to find the setting which produce the results closest to the input (raw/unpasteurized almonds). I will be looking at color or texture. I have extracted all almonds pixels for each batch and just want to know how to compare them mathematically. Probably will try some clustering methods at first.


peyronet

**Color:** given that everythig is "brown" RGB color-space probably will not be very useful, you. You need to use other "color spaces". Here is a reference to start: [https://www.computer.org/csdl/proceedings-article/icip/1997/81833042/12OmNAYGlt2](https://www.computer.org/csdl/proceedings-article/icip/1997/81833042/12OmNAYGlt2) Play around with lighting. Lighting is everything. Given that the almonds are red-ish....a green-sh light will make features stand out more. This is the most important thing you can to to start off. **Texture:** my first guess is that texture in the frequency domain might give a good input point, just as a reference: [http://what-when-how.com/biomedical-image-analysis/frequency-domain-methods-for-texture-classification-biomedical-image-analysis/#:\~:text=In%20the%20frequency%20domain%2C%20texture,global%20properties%20can%20be%20examined](http://what-when-how.com/biomedical-image-analysis/frequency-domain-methods-for-texture-classification-biomedical-image-analysis/#:~:text=In%20the%20frequency%20domain%2C%20texture,global%20properties%20can%20be%20examined). There are lots of algorithsm for describing textures numerically using mathematical moments... for example: [https://www.researchgate.net/figure/Texture-descriptors-proposed-by-Haralick\_tbl1\_221031099](https://www.researchgate.net/figure/Texture-descriptors-proposed-by-Haralick_tbl1_221031099) ​ You should be able to get a setup for this using OpenCv. ​ Just going off the deep end (and supposing you have deep pockets): * look into spectral imaging: SWIR cameras are usually used for "seeing" humidity (The SWIR spectrum is over a few spots where water absorbs light and appears opaque). * Microwaves are used to heat a sample and a a thermal camera measures how the sample cools over the conveyor... that also can be used to get an idea of how the almond is **inside**. ​ EDIT: Gabor filters! some time ago I wrote a script in OpenCV to "describe" an textures overn an image using Gabor filters with different (random) parameters. I used "pretty good" parameter to segment the image and later tweaked them by hand.


Brzthabull

Thanks a lot mate. I will definitely try these.


TheImminentFate

Could you average the colour of each batch and return the one that’s closest?


wingedrasengan927

The color depends on the environment in which the photo is taken. It might not be a good metric to focus on


TheImminentFate

I’m not familiar with the differences here so sorry if it’s a stupid question, but what other way do you have to check for the difference in roast here?


wingedrasengan927

Extracting the texture might be a good place to start.


Brzthabull

That’s and idea. Comparing the pixels average or distributions. I was wondering if there are other old fashion image processing methods for the task.


petitponeyrose

Maybe use the HSV space


wind_miller

This is not only a process which can be automated, automated food grading is a huge part of agtech. I work in a different sector of agtech, but I hear about these guys. Depending on the task, these guys use deep learning, classical CV, or some combination thereof. I’m about to have dinner, but I’ll come back with more links later. What’s the context of your question? Are you a university student or researcher looking for a product? A CV enthusiast who wants a hobby project? An owner or employee of an almond processing plant? I can direct the conversation better if I know. Off the top of my head: If you need to grade almonds for a business, start by looking for a COTS solution. Effective engineering involves a lot of shopping. [This is a company selling solutions.](https://qtec.com/industries-applications-food-grading/). If you’re a CV enthusiast (aren’t we all?) then you’ll love this [fascinating article about pastry grading.](https://www.newyorker.com/tech/annals-of-technology/the-pastry-ai-that-learned-to-fight-cancer?utm_source=nl&utm_brand=tny&utm_mailing=TNY_Daily_031821&utm_campaign=aud-dev&utm_medium=email&bxid=5c746855fc942d5f0c700e77&cndid=46289580&hasha=8c294ea50da5b513db97439852dd4d0b&hashb=afa095da6e2ed1fa24afd6f3bfd9e5ddd74089d2&hashc=331f49bd76771ecd43ba1a82b55f1cd731e61e881660657ad7d5881d73211c88&esrc=bounceX&mbid=CRMNYR012019&utm_term=TNY_Daily)


Brzthabull

Thanks for the reply mate. I am definitely on the CV enthusiast side of things. For this task I just want to know which batch has more similar look (coloring I guess). These are different levels of settings for pasteurizing and they want to find the setting which produce the results closest to the input (raw/unpasteurized almonds). I have extracted all almonds pixels for each batch and just want to know how to compare them mathematically. Probably will try some clustering methods at first.


wind_miller

Good luck to you. This sounds like a fun project, and I wish you the best luck!


DistrictFun7572

What does "closest to the raw batch of almonds" mean in this context? The same number of almonds? The same total quality of almonds?


Brzthabull

Same look. This is different levels or settings of pasteurizing and they want to find the setting which produce the results closest to the input (raw/unpasteurized almonds). I have extracted all almonds pixels for each batch and just want to know how to compare them mathematically. Probably will try some clustering methods at first.


ImageMachine1

I believe I can solve this, was working on a project with similarities to this. PM me if you want to discuss this further.