Kangarecognizer
Kangaroo Recognition Results: finding the skippys in the photo with a neural-net classifier (NNC).

Why?

Because the kangarouter needs to know which route to take to the kangaroos.

The task

This image (click through for full-size original) was taken with a cell-phone camera.
It was divided into overlapping tiles of 400x400 pixels and fed into the NNC trained for { kangaroos, sheep, unknown }.
The results for each tile are shown below.
There are many pictures - it make take some time to load in your browser, and many of the images are clearly just sky or close grass.
The percentage given is the neural net's confidence that it sees a kangaroo in the image.

The NNC was trained for the set {kangaroo, sheep, unknown}, This seemed a good idea at the time (because we need to differentiate between kangaroos and sheep, because we want to leave the sheep alone, and just approach the kangaroos), but on reflection probably wasn't that smart. Some of the results below might reflect the NNC thinking it saw a sheep in the background.
Also, the NNC gets very slightly triggered by clouds in the top row of tiles. Clouds sometimes look like ... stuff .. and some of the results might be the NNC seeing skippys in clouds. It seems that robots too have imagination, and apparently androids dream of more than just electric sheep.

Process - retrain an existing image classifier for new categories

For those thinking of doing the same thing - some notes on tiling the original image.

Classification of the resultant tiles

  01.07%

  01.86%

  01.66%

  01.18%

  01.75%

  01.28%

  01.79%

  02.88%

  02.49%

  01.58%

  02.12%

  01.44%

  00.60%

  01.46%

  02.78%

  02.38%

  03.59%

  05.41%

  04.45%

  08.10%

  00.75%

  02.32%

  01.77%

  00.92%

  01.12%

  00.83%

  00.79%

  01.44%

  01.56%

  00.96%

  01.84%

  02.30%

  01.44%

  03.21%

  01.73%

  03.15%

  02.34%

  03.86%

  03.76%

  02.74%

  03.31%

  01.16%

  00.42%

  00.57%

  00.99%

  00.94%

  00.58%

  00.85%

  00.70%

  00.52%

  01.42%

  02.76%

  00.48%

  00.13%

  00.55%

  00.43%

  02.26%

  05.92%

  02.48%

  02.92%

  00.86%

  02.24%

  00.84%

  03.31%

  00.56%

  00.71%

  02.13%

  01.83%

  00.14%

  00.48%

  02.39%

  05.61%

  01.27%

  01.67%

  01.43%

  03.69%

  06.37%

  02.66%

  02.13%

  00.89%

  00.38%

  01.33%

  02.05%

  00.29%

  11.12%

  01.45%

  07.29%

  08.16%

  17.92%

  07.27%

  03.39%

  99.81%

  99.05%

  23.22%

  33.63%

  09.86%

  21.93%

  09.94%

  03.79%

  19.40%

  26.87%

  05.74%

  00.63%

  02.33%

  00.95%

  35.29%

  18.68%

  10.10%

  17.50%

  23.43%

  47.01%

  53.06%

  99.95%

  98.27%

  82.97%

  96.37%

  19.85%

  27.57%

  22.71%

  19.67%

  02.00%

  01.36%

  06.12%

  03.67%

  01.08%

  06.79%

  31.70%

  28.51%

  05.16%

  04.31%

  19.23%

  17.22%

  22.12%

  11.21%

  19.34%

  01.82%

  17.60%

  03.24%

  03.52%

  00.36%

  01.36%

  00.35%

  01.29%

  01.93%

  02.08%

  22.71%

  22.79%

  41.78%

  35.94%

  37.56%

  41.82%

  59.41%

  46.01%

  38.20%

  30.70%

  55.32%

  22.70%

  38.87%

  55.06%

  11.77%

  02.92%

  01.98%

  01.46%

  02.57%

  01.46%

  03.98%

  36.66%

  27.69%

  26.99%

  27.03%

  18.10%

  28.94%

  23.72%

  28.23%

  34.62%

  10.69%

  10.99%

  24.62%

  37.61%

  36.68%

  32.58%

  53.00%

  23.99%

  18.21%

  36.04%

  52.62%

  55.21%

  44.04%

  25.59%

  11.10%

  02.91%

  02.80%

  11.68%

  13.68%

  02.41%

  04.42%

  04.78%

  05.53%

  06.83%

  08.62%

  17.96%

  20.14%

  09.96%

  20.34%

  13.86%

  12.48%

  12.17%

  30.16%

  37.70%

  22.34%

  22.89%

  28.09%

  03.26%

  05.37%

  16.20%

  14.77%

  06.00%

  02.16%

  03.96%

  06.19%

  02.00%

  03.95%

  05.17%

  04.21%

  03.56%

  05.86%

  04.07%

  05.66%

  21.05%

  30.78%

  32.96%

  01.13%

  00.24%

  00.08%

  00.37%

  00.18%

  00.12%

  00.07%

  00.04%

  00.15%

  00.20%

  00.10%

  00.20%

  00.74%

  00.22%

  00.25%

  00.10%

  00.11%

  00.74%

  00.72%

  01.03%

  11.58%

Conclusion

It works.

Discussion

A few points

    The NNC seems to think it might see kangaroos in the clouds in the first row of tiles. Heh. Humans do this kind of thing too.
    The NNC gets triggered by some of the grass shots, which clearly don't contain kangaroos. Bear in mind the training data would have generally NOT had grass for the non-kangaroo shots, so it's really just reacting to the grass. 'There's grass here, therefore there is a good chance there is a kangaroo'. If the NNC had been trained only in Australian country-side shots it might have done better.
    There is one obvious semi-miss - one of the shots (search on page for 82.97%) doesn't detect the kangaroo well. Almost all kangaroos in the training set are face-on, and side-on kangaroos therefore may look more like sheep. Hence the kangaroos in the background might be recognised as sheep, lowering the kangaroo probability to 82.97%. Maybe.

Leave a comment

Something I'm doing wrong? Solved my problems? Got a better idea? Got a similar problem?
Think I might have solved your problem? Ninety-nine problems, but your robot ain't one? Say so ..