Hacker News new | ask | show | jobs
by twa927 2608 days ago
> Until about 2013, If you wanted to make a software system that could, say, recognise a cat in a photo, you would write logical steps. You’d make something that looked for edges in an image, and an eye detector, and a texture analyser for fur, and try to count legs, and so on, and you’d bolt them all together...

I'm doing a lot of such algorithms (well, not for images). Does someone know if such algorithms have a name? I'm calling it "heuristics" and I think it falls under "AI".

10 comments

A while ago, Google photos autogenerated a video for me from my photo library. It was about a minute long, stitched together dozens of photos, called "dog video", and with a horrifying yapping dog soundtrack.

Every single photo was of a cat.

I have to say I was humbled by the amount of human and computing power that had gone into developing this system over the years, that could achieve such a complicated, impressive technical feat, without requiring any effort or money on my part, and yet also be 100% wrong.

> be 100% wrong

This really is quite impressive. It's rare for humans to do worse than random guessing on tasks, and they almost never do much worse. There's something almost charming about the ability of AI to put real effort into actively avoiding correct answers.

Really it sounds like an error somewhere else, rather than the AI system. More like the ID for cat and dog were switched.
If this is the Google Photos folder system, I suspect the problem was that the IDs and the bucketing were de-linked.

Photos creates folders for you based on identified themes, and then adds new photos to them as they're taken. I haven't checked, but I'm guessing it doesn't relabel existing buckets to avoid causing confusion. And I'm not sure whether bucketing is done by assessing theme or similarity to other photos in a folder. If it's the latter, the system could have hit the confidence threshold to make a Dog folder out of a few images, then ceaselessly dumped similar-looking photos (i.e. cats) into that bucket.

For the specific example given there, I'd say it's most often called feature engineering. I'd also argue that it's a lot more necessary than most people think, but I'm probably just being stodgy and am biased by working in relatively narrow domains.

Calling it "feature engineering" implies it's still being fed into some sort of trained classifier to make the final decision, though.

What you're describing of your own work might better fall under the broad category of an "expert system".

I think expert systems consist of a "rule engine" where rules can be added dynamically?
I kind of like the tongue in cheek moniker "GOFAI" (Good, Old-Fashioned AI), though that is applied more to symbolic AI https://www.cs.swarthmore.edu/~eroberts/cs91/projects/ethics...
Maybe image segmentation? In my AI class it was referred to as image segmentation and edge detection (interchangeably)

https://en.wikipedia.org/wiki/Image_segmentation

I call these approaches: "there must be OpenCV in there somewhere"
Heuristic algorithms using hand-crafted features.
First order logic rule-based system
I would call it “classical” machine learning.
Hmm, I think there's no "machine learning" here. There's a human hard-coding some thought process, using mostly some simple statistics/thresholds to e.g. define what a "fur texture" looks like.
Machine learning was extensively used in image processing before 2013 / deep learning.

The main difference is that you’d write code to extract features from the image and then learn a model using those features (as opposed to using the pixel data directly and learning a model from that as in CNNs).

As an example, you wouldn’t necessarily write code for “fur texture” but instead would extract histograms of pixel brightness gradients and feed those (along with other things) to a machine learning algorithm. In this example, fur texture would generate a different histogram (to be used as a feature) than skin texture.

https://en.m.wikipedia.org/wiki/Histogram_of_oriented_gradie...

Ok, so this depends on what algorithms are used for the feature detection ("edges in an image, and an eye detector, and a texture analyser for fur"). I'm guessing hand-coding an algorithm for detecting edges in an image can be done successfully, but it looks much harder for "an eye detector", so it needs "machine learning"

What I meant when asking for a name of an algorithm class are algorithms where the feature extraction is done using hand-coded algorithms.

You can call them “handcrafted decision trees” then.