132 comments

[ 1.6 ms ] story [ 213 ms ] thread
tl;dr: With a training dataset of over 7000 images, the system is incapable of performing the cucumber sorting task on live data with greater than 70% accuracy - likely do to over fitting on the "small" training set (where it shows 95% accuracy). Also, it is currently incapable of taking into account a number of the existing variables used for sorting.

If one were to leverage the power of a supercomputer trained with tens of thousands more observations - all meticulously hand categorized - it would probably get better.

Truly, we are only limited by our imaginations.

How does it compare to human sorters?
I understand the rhetorical implications of your question, but I am unclear on how you expect me to answer it.
I'm not sure it's rhetorical, I think the implication is that human sorters are also imperfect so what's there accuracy level? Is it 70% (a tie), 90% (clearly better), or 50% (the computer is better).
<semantic discussion about the use of "rhetorical" in my comment ensues. We land at some kind of an understanding of one another and we both grow a bit as human beings.>
So how does it do versus his mother? Regarding how much their results agree or disagree.
Well given his mother is by definition the training set, surely the machine can only perform as good as or worse than her...?
There's no reason to presume that.

It's not like conveying knowledge in the sense of information transfer (where by definition a student can't know more than their teacher -- without external help).

It's like teaching a skill.

In human terms, a person can get to play better piano than their piano teacher, better poker than the person who taught them poker etc.

As the "training set" she just gives the basic skills for the recognition. The algorithm could discover further patterns she can't see beyond what she knows (e.g. she knows just that greener ones are usually better, but the algorithm notices that greener and taller are usually also better), do the calculations much faster and consider many patterns while the woman does a more shallow examination, etc.

In order to get the necessary data for a machine to bootstrap new criteria, wouldn't you need an independent scoring function for each sample? How are you going to get that data - are you going to auction off individual cucumbers?

Alternatively, you could track each cucumber with an Independent ID to see when it is sold, relative to other cucumbers - on the assumption that people are selecting the best from any given batch? But then you'd need to control for things like the position of the cucumbers in the display. Now you're in pretty deep into someone else's business, because you're a wholesaler, and the data will still be insanely noisey.

>In order to get the necessary data for a machine to bootstrap new criteria, wouldn't you need an independent scoring function for each sample?

Merely having an experienced human score images for them can be enough for the machine to self-discover new criteria based on the pictures and their scores.

This is what I was getting at - from the information at hand, the mother's classification seemed to be the definition i.e. She had 100% accuracy because whatever she classified was the right answer
Yes, but the machine could e.g. learn to see patterns present in her classifications that she can't see or haven't figured out (relying on fewer other patterns) and thus fare better.
(comment deleted)
Well, I for one am non-rhetorically, legitimately curious about how well human sorters do.
This question is predicated on the assumption that there are objective, codified criteria against which human sorting can be judged. That assumption is false.

> "In Japan, each farm has its own classification standard and there's no industry standard."

Right now the only question is "how closely can the machine approximate human sorting."

Given humans can't be judged it stands to reason that you can just call the machine a human, and bada boom, you just saved a lot of money.
Humans could be judged against each farm's reference human. In this farm's case, there is only the one human sorter. That reference human is the basis for comparison for the machine as well.

The machine sucks at it right now.

I think he can easily extend the system to use the missing variables. Scratch marks, color, texture and prickles are easily enhanced by digital image processing. Maybe use a different network for each feature and use this output to feed into another network to get the correct classification-function.
If you read the article, the majority of the limitations I describe are the result of his running the system on desktop hardware. It takes multiple days to train the system using 7,000 80x80 resolution images. Hence the caveat about the availability of a supercomputer.
Or he could stop training on CPU and use GPU like pretty much everybody in the field...
While it's a cool concept and agriculture is ripe for technology disruption, the enterprise software product marketer in me finds it to be a calculated marketing stunt, if not an disingenuous one.

TensorFlow is, in no way shape or form, ready to be used by anyone but very technical people with a solid knowledge of both software engineering and machine learning. In fact, it's probably unfair to single out TensorFlow because every deep learning toolkit I have seen is still in the same "extremely early adopter" phase. Yet, this article makes it seem like a line of business user (farmer) with some background in technology (former embedded systems engineer) can use deep learning to transform his/her business -when, in reality, much expert help is needed to make it work. In other words, it would have been a lot more plausible/genuine if the article read like:

1. A progressive farmer got in touch with Google.

2. Google dispatched their solutions architect to work with them.

3. Hey, a cool, early prototype is working!

I am not trying to be a hater. Deep learning has huge potential, and Google, among others, is doing a lot to make it accessible. That said, this type of over-promising ahead of market reality is what gives cutting edge technology a bad name.

Not to mention that if this solution took off, someone - the farmer, Google or an existing sorting-device company - would market it to most other farmers.

So most farmers won't be tweaking TensorFlow any time soon even once the product becomes mature - well, they might wind-up using a high quality UI for customizing said existing solution.

You'd be surprised... It's like an activation energy in chemistry. Just because two chemical reactants have enough energy to react doesn't mean it's likely to happen. You often need a catalyzer or have many many possible reactants to play the numbers game. Right now, this kinda of small scale farming is right at the "enough to react but not quite ready to chain react" phase. Computational costs need to fall some more to increase possible pool, but it'll happen soon likely.
"Cucumber classification" seems almost identical to the letter classification task which is the beginner's tutorial on Tensorflow. I think anyone who knows Python and completed a Coursera or Udacity course could get something implemented.
> "Cucumber classification" seems almost identical to the letter classification task

Why do you say that?

You're looking at the shape of an object, and determining which category it belongs to. It is similar to looking at a handwritten "a" and determining if it belongs to the "a" category.
"Even with this low-res image, the system can only classify a cucumber based on its shape, length and level of distortion. It can't recognize color, texture, scratches and prickles,” Makoto explained. Increasing image resolution by zooming into the cucumber would result in much higher accuracy, but would also increase the training time significantly.
That seems incredibly reductionist, and you might as well say they're the same because "you add a bunch of numbers together and see if the result is bigger or less than zero."

(Also how do you know or why would you expect that it's categorizing by shape? Neural networks are infamous for finding "irrelevant" features in training data).

I don't understand your objection. Letter recognition takes a bitmap, and sorts it into one of 26 categories, cucumber grading takes a bitmap, and sorts it into one of 9 categories.

Of course it's reductionist. Generalizing an abstraction across many things that superficially look different is what programmers do. Reducing problem complexity to make something easier to automate is what programming is for.

Saying cucumber grading is like letter recognition is a true generalization that is also useful. Saying that they're both "adding a bunch of numbers" is a true generalization that is less useful. Programming, and (way more) broadly, science and engineering itself, is about finding useful generalizations.

"Cucumber classification"can be solved easily with a C3NN (Cucumber Classification Convolutional Neural Network).
Man, people just can't win on HN.

Just the other day on HN: people use excel because they don't have the elite mental reasoning ability that programmers have. Programmers are so awesome, it's cute that factory foreman use excel when they should be using my stellar programming skills for some hand wavy reason like "it's hard to tell what you did and reproduce it."

OK. Point taken.

Now here the sentiment shifts to the other extreme. People shouldn't go off and try to use cutting edge technology without the skilled supervision of an expert. Really, I would take this story better if Google were involved because they have a monopoly on the world's brain power.

---

I get that the common thread in both of them is that a programmer should be involved, and I get that I was overtly sarcastic.

But can't we just judge based on merit? Why not critique his approach, why not suggest what you would have done differently, or something to that effect.

Why do we immediately turn it into smarter than everyone programmer vs the idiot common folk.

I read the parent comment completely differently. I don't think he was saying that non-technical-people are worthless and shouldn't try to do anything. I think he was saying that the tools are difficult to use in their current state. Perhaps in the future they will be easier to use and more available.

Similar to programming. Programming languages are difficult to get and learn to use. See e.g. my test here on how difficult it is for nontechnical peopel to even install python: https://news.ycombinator.com/item?id=11453086 Whereas Excel is widely available and taught in schools.

Yeah I wish there was a library that people with a casual interest could use to just mess around. Or even just use deep-learning based tools built by other people.

I remember when the deep dream thing came out, there was a huge interest by people wanting to experiment with it on their own, or just use the existing code on their own computer. But installing these libraries is very difficult or impossible, particularly on Windows. People were trying to get it to run on virtual machines, which adds complexity and slows it down, and can't take advantage of GPUs which is necessary. They don't work on non-nvidia GPUs, etc.

The best example I found was Brain Simulator (http://www.goodai.com/#!brain-simulator/c81c). Which ran on Windows, had a GUI, and was intended to eventually be used in the game Space Engineers so nontechnical users could experiment with AI algorithms and build robots for the game.

(comment deleted)
I may write something like you have described. It would use OpenCL rather than CUDA. Though I would like it to be scalable, the starting goal will be simplicity and ease of deployment on a range of devices.

Do you have any suggestions for the API?

If you wrote some simple code that would work if there was a functioning learning module, what would it look like (if you feel like contributing to this)?

I am not an expert, but in my brief experimentation, I am a fan of the Torch API. It's focused on modules that you can easily build and combine together in very open ended ways. I have no idea what the best method would be though.
Of course it's a marketing stunt but it also depicts one of the endless possibilities of deep learning. So I don't think its over hyped. For Google to invest more on making Tensorflow easy to use, there has to be early adopters showing enough interest. This will make Google invest enough resources to make it more mainstream.
> in reality, much expert help is needed to make it work.

I totally agree. Having been taking classes and read ML/CNN articles online, this Google Cloud blog post made this project seem to be significantly easier than the actual effort that went into it. In particular, the blog simply covered the secret sauce to make it work in one line:

> Makoto used the sample TensorFlow code Deep MNIST for Experts with > minor modifications to the convolution, pooling and last layers, > changing the network design to adapt to the pixel format of cucumber > images and the number of cucumber classes.

I doubt this is a one man operation in just a few months of time, considering the computing power that's required to accomplish such feat (which it was said to take 2-3 days for each complete training set). Let alone the fact that they admit 7000 cucumber images are NOT enough to train the model to achieve the typical 95% accuracy that the original MNIST model it was based off.

Although promising, this blog post reads more like a PR campaign for GCP's ML offering (with the custom hardware devices to do the compute, perhaps TPUs?)

I just wish they'd move their CloudML thing out of alpha, I've given AWS too much of my money for their shitty GPUs.
What will the pricing for CloudML be? It will be difficult to bootstrap anything without a free tier of some sort.
I would be super surprised if it wasn't at least cost competitive with AWS/Azure GPU instances.

They didn't approve my request for alpha access though, so no real insight on my end.

What can you guess are their criteria for approval? I applied as well.
Probably how likely you are to spend a significant chunk of change on their cloud offering
I disagree. One of the first projects I tried in deep learning was to tweak the LeNet-5 style MNIST example to handle 64x64 color images. It was pretty straightforward. Pretty straightforward doesn't mean it took ten minutes; but it didn't take more than a couple of hours, for someone clueless about DNN models.

If you look at: https://github.com/tensorflow/tensorflow/blob/master/tensorf...

you could actually manage it just by changing some of the image size and classes constants. In earlier versions of that code, you'd have had to manually change a few constants that weren't extracted well. This is approximately easy, once you know your way around the python side of TensorFlow. (Which itself takes some work, but it's not rocket science.)

A better approach would probably add a third convolutional layer to continue to shrink the 80x80 input down to something easier to handle in the fully connected layer.

What's surprised me is actually how slow it is, knowing nothing about their model. My guess is they could speed it up by adding that extra convolutional layer to reduce the amount of work done in the final FC layers. The fact that they're that slow suggests the opposite of what you're noting -- I doubt they had serious assistance on the machine learning side. I'm more impressed by the amount of time it must have taken to get the physical parts working and to collect 7,000 training images!

Training MNIST itself is trivial. You can get > 99% accuracy in only a few minutes of training using a single GPU. This model should be at most 10-20x slower than MNIST (but, again, that FC layer would scale badly).

If you look at the stackoverflow tags for tensorflow, you'll see a lot of very similar problems being solved. ("I want to reuse model X on problem Y, where such and such is different").

TPUs are awesome, but you don't need them for this problem. You could run the inference at 1 cucumber per second on a laptop. And you could train it on a Titan X in a matter of hours at most.

(Source: I was and am still slightly on the Google Brain team, as a non-machine-learning person.)

Hardly.. the guy is only getting 70% accuracy. The hard part is the assembly line and he probably has a background in that.
What in the article made this sound like a complex application to you? It seemed to me like any number of vanilla NN's could have done the job as simple image classification tasks like these have been done successfully for decades. TensorFlow was chosen because he found out about it via Alpha Go, so Google's marketing is doing it's job. Given the man's embedded systems background, it seems entirely plausible that he could have designed and implemented the entire solution himself. (for most people, the 'hard' part of integrating the NN into the real world via the rpi would likely have been relatively easy for him given his experience.) While I generally tend to be cynical about most success stories, this one actually sounds pretty reasonable.
> That said, this type of over-promising ahead of market reality is what gives cutting edge technology a bad name.

Change "deep learning" to "expert systems" and "TensorFlow" to "decision trees" and that article could have been written in the 1980s: https://www.youtube.com/watch?v=6xpcES-ueKw

> I am not trying to be a hater. Deep learning has huge potential, and Google, among others, is doing a lot to make it accessible. That said, this type of over-promising ahead of market reality is what gives cutting edge technology a bad name.

Actually, this type of marketing is _exactly_ what is needed to get people interested in applications for this technology.

This particular farmer, perhaps, is an unusual case in that they went straight to machine learning with sexy new tools. However, machine vision has been used for applications in agriculture even as long as 20 years ago (I know this personally :-) )

It isn't at all surprising that a farmer decided to go "cutting edge" with a little help from Google. In fact the theory for the "diffusion of innovation" was based largely on observations of FARMERS!!(https://en.wikipedia.org/wiki/Diffusion_of_innovations). What I am saying is that although farmers seem to have an undeserved reputation for being low-tech, some are _very_ adept at technology especially when it has the potential to give them an advantage in the market.

> While it's a cool concept and agriculture is ripe for technology disruption

Is it? From what I've heard farming is pretty high tech already.

Google dispatched their solutions architect to work with them.

That's interesting. Is Google going into the consulting business? They might. That's much of what IBM and HP do now. If you're selling a new, complex B2B tool, you almost have to provide consulting services.

This seems to be the arc just about every large tech company goes in.
This was a marketing piece for Cloud ML. It didn't seem like any overpromising occurred in the blog post. Saying that a commercialized out of the box product that has feature X which does not have feature X is overpromising. Promoting a developer platform with early adopter use cases seems like a valid thing to do, which is all they did here. Did I miss something?
* Disclosure: I work for Google with the OP, and sit next to him in Japan.

"2. Google dispatched their solutions architect to work with them."

That's not what happened at all. He built the system entirely himself before getting in contact with us.

I think that while very complex machine learning tasks do require specific knowledge, creating a neural network that can do real work is within the abilities a single individual.

ktamura is not saying that happened, is saying that if that happened it would be more real than the current one. The current one (while true) looks like a TensorFlow advertising, making it sound easier than it really is.
Sure. It's just that we can't make it more genuine or plausible by writing it that way because it's not true.
>That's not what happened at all. He built the system entirely himself before getting in contact with us.

Good to know. While what I said was meant to be hypothetical, I am happy to stand corrected.

>creating a neural network that can do real work is within the abilities a single individual.

This really depends on said "individual." My biggest issue was the tacit conflation between two themes, one valid and another reeking of "feel good" marketing:

1. That a reasonably technical person can use neutral network to do useful things, no small part thanks to something like TensorFlow (valid)

2. That such individuals are prevalent in agriculture (???)

I am all for hero-making: it's at the heart of marketing and customer advocacy. However, as someone who has been doing technical marketing for awhile, I just find this story exceptional in both senses of the word (as others commented, perhaps I turn out to be wrong!)

That's fair. As the reader you can be the judge.

Advocacy is partly about inspiring others and I think this does that while presenting an accurate representation of what the farmer was able to accomplish.

Not at all. Admittedly I'm a strong developer, but very little knowledge of Deep Learning. I picked up tensor flow in a month.

Also, the guy is getting 70% accuracy. I doubt google helped him :p

" ...First they came for the Cucumbers, and I did not speak out—

Because I was not a Cucumber ... "

-Song of those Tensorflow'd out of their jobs.

[Edit: Changed Cucumber sorters to cucumbers to clarify the sarcasm]

Honestly? Cucumber sorting sounds like a shitty job. Very few people are picketing because humans aren't spending large swaths of their lives churning butter.

But the tone of the article is ridiculous. For any reasonable definition of "it works", the system doesn't work yet.

It was supposed to be sarcastic. Didn't get the tone right.
Cucumber sorting sounds like a shitty job.

No one's saying it's a great job. But the point for many of these people is that it's a job. Which they won't easily be able to find a replacement for.

Absolutely disgusting that you compare low-skill workers being replaced with automation to the holocaust.
Feigned or real but out of place moral disgrace is even more shameful.
Why do you think they're low-skill workers just because they're doing agriculture? From the article "It takes months to learn the system and you can't just hire part-time workers during the busiest period.".
Am I the only one that thinks this is grossly overengineered solution? Wouldn't the simple machine with differently shaped and sized holes do equaly good or better? Existing industrial machines are usually pretty good at mechanical sorting (think of things like shelled sunflower seeds, etc.).
In the article they talk about many factors that a mechanical sorter will have no ability to account for, color, prickliness, curvature.
(comment deleted)
Yes, this is a basic computer vision task, so I think deep learning is probably overkill. In this case, there's no clutter and you can choose any configuration of cameras and illumination you like, which makes the task much easier (and probably feasible on a single desktop machine...).
While it is very cool...I cannot help thinking how many sorters are going to lose their jobs because of this. Scary.
But that's not how progress is made. This whole concept of machines taking over has been happening and will happen more. Humans are good at adapting to circumstances, learning new skills and doing more productive work. So guess it's not that scary.
This whole concept of machines taking over has been happening and will happen more.

But what seems different with the AI "revolution" is that we may be seeing a hockey-stick rate to these changes that simply has no historical precedent. In which the "progress" (read: forced obsolescence) that might hitherto have happened over the course of 1-2 generations may soon be happening in the space of 5-10 years, for large categories of job descriptions, planet-wide.

So guess it's not that scary.

Unless you're the one whose job is threatened -- or as is apparently the case of this "success story", eliminated already. Do you really think all these displaced cucumber sorters can find work as Machine Learning engineers at some hot startup?

Or in the near term, any kind of job at all, without significant difficulty?

You're right. We should all go back to using horses instead of automobiles while we're at it.
That's (very clearly) not what I'm saying.
That was (very clearly) sarcasm.
Yes, but sarcasm that I at least would interpret to mean: "Your argument is calling for a halt to progress, which is as silly as going back to using horses."

But the parent wasn't actually suggesting that progress be stopped, merely observing that it was going to cause social problems.

It would be much better for the cities and the environment, for one.

And not everybody would need to have a horse, the same way not everybody needs to drive (and most don't) in cities designed for humans.

Not necessarily.

If the solar installer can't get to the customer's house because he's traveling by horse...

Or the biofuel engineer spends an extra 2 hours a day commuting on his horse, rather than developing new technologies in his lab...

Then it's not better for the environment for us to all move to horse and cart.

Then, you know, we could always allow vehicles for professional uses...
How would 250 million horses pissing and shitting everywhere, plus needing to be stabled, fed, and used on a daily basis be better? I'd need to see more analysis before I believe that what worked 100 years ago would scale up to what would be needed today without serious problems, environmental and otherwise.
Don't be obtuse, and address the point. How are you going to retrain an entire generation of people that will experience the effects of joblessness immediately; essentially overnight.

Cars took at least a generation to become mainstream. This time around it seems technology will destroy jobs almost at the flick of a switch.

Unless you're arguing that the adoption rate will not be significantly quick, which I think most would disagree with.

What about the cotton gin or the sewing machine or the steam engine?
Those are incremental inventions within an overarching paradigm; that being the industrial revolution. The industrial revolution is what produced those inventions, and many others that lead to the countless wars, and newer ways of thinking, which resulted in significant changes in society. Undoubted it has produced great positive changes, but in the short term it was really quite awful.The question is how great of change are we really looking at this time around. Heck is it even a revolution in the first place, or merely an incremental progress.

I personally don't think it's incremental and that we're at a point where we just had the idea of collecting seeds and planting them in the ground. The resulting aftermath of that simple idea produced civilization. The resulting aftermath of computation is yet to be seen.

No one is, just like we never do. What have all the people who have been losing their factory jobs for the past 2 decades done?

> that might hitherto have happened over the course of 1-2 generations may soon be happening in the space of 5-10 years

It's been happening in that shorter timespan for a while now, so really, what have those people who have already lost their jobs done?

You have two options

1) Either technology is truly revolutionary, which means that it has a revolutionary change on society by producing an entirely different dimension of techniques and ideas that make everything in the past irrelevant.

or

2) The technology is incremental and will only make tasks more efficient, and only has a marginal change on society by producing newer linear techniques.

If it's (1) then in the long term there is definitely a huge benefit, but in the short term there's bound to be a great social upheaval. Ones that change the shape of governments, and throw society in chaos. Just look at the industrial revolution, or agriculture.If it's (2) then really it's merely a gradual process that almost goes unnoticed, save for in retrospect. Which makes it very straightforward to change and redirect people through education.

So pick either case. You can't have both revolutionary technology, and gradual social change. Either the tech is truly revolutionary which in that case will result in social revolution, or it's incremental and will result in merely incremental changes.

Well sure, if you define "revolutionary technology" as something that causes a social revolution, then something has to be both or neither, but that's a tautology.

And besides, no one was arguing that the technology was "truly revolutionary", so I'm not sure what point you're making?

> Humans are good at adapting to circumstances

Not really. I would the opposite is true. Most people don't like change and appreciate stability as they get older. You cannot eliminate people's jobs, tell them to adapt and expect them to take that. And when a lot of people use their jobs during a short period of time, guess what? Extremist government/ideology will emerge, and we are already seeing some signs of it.

But also think about how many people are going to benefit from much cheaper cucumbers.
That would require the savings to actually be passed on to the customer (to use a tired phrase) instead of being siphoned elsewhere. This is not a certainty.
If they're siphoned anywhere besides under a mattress they'll be a net benefit. (And even the mattress might just delay their usefulness.)
Well perhaps not right away. But as his competitors adopt similar practices, they will drive down the price.
(comment deleted)
Didn't you know. That the common answer to this on HN, is that these displaced workers are going to retrain for a job in a STEM field.

If that doesn't work, just pay more tax like a good boy and put them on basic income!

Hilarious!

TensorFlow democratizes the power of deep learning

I won't say this kind of innovation is bad, per se, or should be stopped. But the blitheness with which the article sidesteps the collateral damage that will necessarily come of this brave new era of efficiency and progress -- as if there was nothing more to this story than an unemployed engineer helping out Mom and Pop -- really is quite breathtaking.

"Democratized unemployment, and for many older blue-collar workers in years to come, a nearly inescapable sense of hopelessness and despair" is what we might want to call it.

This is a technical post on a Google blog for a software library highlighting a use-case written by a "Developer Advocate" for developers to read... this isn't a NYTimes human interest piece about a new technology written by a journalist for average humans to read.

Regardless of the non-relevant nature of the context, the HN crowd (the target audience) is well aware of the side effects of technological progress.

Similarly, we don't expect every blog post by security researchers highlighting the latest software exploit to include blurbs about the societal implications of vulnerabilities on privacy. There's a time and place for that.

Actually, the whole point of the blog post was that it was a marketing piece -- not a dry research article.
>How a Japanese cucumber farmer is using deep learning and TensorFlow

Let me guess: shallowly and for marketing purposes...

As someone who is using the Raspberry Pi professionally, I'm nervous when I see that rainbow square in the top right corner in both their screen snapshot and the video (0:16 in). It's a sign that the Pi doesn't get enough power which might results in an unstable operation or even SD card corruption. I hope there's still a human backup sorter should the system fail :-)
My Raspberry PI corrupts data if the power goes out unexpectedly. I don't understand why it's used for any non-hobbyist application, at least if using the internal SD card to do a lot of read/write. I got myself a fanless cherry trail based system to replace it. Some guy did a hardware modification to fix his: http://therandomlab.blogspot.com/2014/04/how-i-solved-my-sd-...
I fully agree. That's why I've invested lots of work into my digital signage os (https://info-beamer.com/hosted): It's booting into a read-only squashfs that contains everything. The squashfs, kernel and PI firmware itself are on the read-only FAT partition. All data that is required as display content ends up on a second read/write partition. If there is any data corruption or similar problem, my system can fully restore that automatically. Here's a small blog post were I wrote about this: https://info-beamer.com/blog/building-a-reliable-raspberry-p.... So far the system has never had any problem from power loss or cutting power. Interesting hardware hack you linked there. I haven't seen that one before. Thanks.
At first the headline made me skeptical because I expected it to be one of those clickbait articles where someone deploys excessive firepower solving a trivial problem. However! It turns out that cucumber sorting is well-suited to deep learning: a) there is enough interest to generate a reasonably-sized data set, and b) It is one of those difficult "I'll know it when I see it" classification/evaluation problems.

However, as soon as they described the actual solution I felt somewhat let down.

1. Reducing the input to 80x80 images is likely unnecessary; it removes some of the most important features (number of thorns, blemishes) from contention. If the issue is computational cost (and therefore training time) you might consider using cloud GPUs. However, a network with multiple "towers" (like Google's Inception model) could conceivably allow for evaluating the sorts of aspects that require higher resolution relatively cheaply (one-or-two convolutional layers with pooling and then a fully connected layer) along one pathway, while a different tower (with more layers or more units per layer) processes the resized images.

2. If the network used was just a modification of the MNIST one, then it seems like it ignores the ordinal nature of the problem. If cucumber quality can be ordered, why not use a regression model instead (or maybe regression along multiple criteria, like straightness, bumpiness, thickness, etc.) instead of treating each class as if they were completely separate?

3. Why not release the dataset? I have GPUs, the necessary background, and a few hours to try out some models. I also have a heretofore unrecognized yen to use my models to generate images of the ideal Japanese cucumber, so I'd be willing to do it for free.

This is just a prototype - and an effective one at that because as you demonstrated it's a good starting point to brainstorm about where this technology could go if someone invested real time into developing it. So I wouldn't over analyze this.

I personally think it's exciting to see average-person real world use cases for these new deep learning tools. I wasn't going in expecting a fully-fleshed out system. It's just one guy helping out his parents with a summer project.

Cucumber grading has been automated for years. Look on YouTube for automated cucumber grading systems.[1][2] There are many competing vendors. The commercial machines process their video locally and don't need "the cloud". They're also much faster.

Fruit and vegetable sorting using computer vision is routine. That's why commercial produce is so consistent - it's been pre-sorted. The existing technologies are so fast that it's routine to inspect and sort peas, and possible to sort grains of rice.

Most of the cost and complexity in the commercial machines is in the material handling. There are conveyors and devices to get the individual items lined up. Cleaning and washing stations are usually part of the line. Commercial machines have to be built sturdily so they survive continuous use, and have to be cleanable with high-pressure soapy water. The little unit that does machine vision is a minor part of the processing line.

AI techniques are routinely used. Support vector machines are popular. One Indian system uses fuzzy logic. ANNs have been tried but are not yet popular.

The systems generally measure user-defined features - length, width, curvature, color, flaws - which then go into a simple grading algorithm. They're not trying to match human decisions.

[1] https://www.youtube.com/watch?v=5DCpOx-q_yo [2] http://www.aweta.nl/en/produce/cucumber.html

Yeah, but I'm guessing they cost a lot more than a raspberry pi, they mention these systems in the article
That's like saying a shovel is better than an excavator because the shovel is cheaper.

In some cases the shovel is better, but you can't effectively compare the two of them.

> In some cases the shovel is better, but you can't effectively compare the two of them.

Too late: the thread you are participating in has already made the comparison from the very beginning. It's like an HN article titled "Local Man uses nuclear-heated shovel to clear snow off driveway" where the first comment is about how JCB and CAT offer superior options...

Surely tensor-flow is better than just a shovel?
I read Tensorflow to be the "nuclear heated" part.
having worked doing produce sorting ( http://www.compacsort.com/ ) A lot of the cost is the mechanical system. for the very simplest / slow kind of sorting they are doing, computer/vision wise you don't really need too much.
Thats some amazing machinery.
"Cucumber grading has been automated for years. Look on YouTube for automated cucumber grading systems.[1][2] There are many competing vendors. The commercial machines process their video locally and don't need "the cloud". They're also much faster."

I think OP in a way demonstrates something characteristic of Japanese agriculture:

"There are also some automatic sorters on the market, but they have limitations in terms of performance and cost, and small farms don't tend to use them."

Japanese agriculture is notoriously unproductive compared to other countries' yields and inputs, and a major reason is the lack of scale and mom-and-pop farms. If this farm were bigger or needed to save labor costs more, it could afford the already existing solutions and would sort cucumbers into more standard grades than their own ad hoc system. But they're not, so instead they do it by hand.

>Japanese agriculture is notoriously unproductive compared to other countries' yields

As an aside, my dad swore the produce was notedly better than what we have locally when he was travelling there. He on multiple occasions also discussed their dedication to quality.

Maybe they're onto something given this related discussion was on HN earlier this year...

https://news.ycombinator.com/item?id=10997485

I'm a Swiss living in Japan and the produce here is hands down the best I've ever eaten. Locally produced stuff in fertile areas in Switzerland comes close, but in Japan it just seems to be so much more bred for taste than looks. No problem to eat raw with nothing added.
> AI techniques are routinely used. Support vector machines are popular.

Do you have any information regarding what kind of accuracy such SVM have in practice? What do they do with the false positives and false negatives, do they reinsert back in the line ?

> AI techniques are routinely used. Support vector machines are popular. One Indian system uses fuzzy logic. ANNs have been tried but are not yet popular.

I'd argue that industrial application is much, much more advanced that current automotive AI application (because plants don't have tho choose the absolutely worst and cheapest viable solution for cost reasons as it is the case in automotive applications).

What an eye opening blog post. I never thought about a production line / manufacturing as a software process.
Completely off topic, but why is having lots a prickles a positive thing in a cucumber?

Would that just meant they have to be cut off before you can eat it?

If anyone is interested to work in the food tech / image processing area, we are an early stage startup[0] building small scale automated food preparation robotics and have an image-processing focused industry-experienced Mechatronics PhD as an advisor. We are based in the most natural / pleasant part of China, Yunnan.

[0] http://8-food.com/

I don't understand why people say there is no way a non-Google engineer could do this. It's not rocket science... This farmer obviously has an engineering background, either as a job or a hobby.

The electronic/mechanical engineering of the sorter is actually much more demanding than training tensorflow on a custom data set - which is a fairly trivial task.

Anyway, cool work!