But Can Your AI Recognize Slugs?

The common garden slug is a mystery. Observing these creatures as they slowly emerge from their slimy lairs each evening, it’s hard to imagine how much damage they can do. With paradoxical speed, they can mow down row after row of tender seedlings, leaving nothing but misery in their mucusy wake.

To combat this slug menace, [Tegwyn☠Twmffat] (the [☠] is silent) is developing this AI-powered slug busting system. The squeamish or those challenged by the ethics of slug eradication can relax: no slugs have been harmed yet. So far [Tegwyn] has concentrated on the detection of slugs, a considerably non-trivial problem since there are few AI models that are already trained for slugs.

So far, [Tegwyn] has acquired 5,712 images of slugs in their natural environment – no mean feat as they only come out at night, they blend into their background, and their slimy surface makes for challenging reflections. The video below shows moderate success of the trained model using a static image of a slug; it also gives a glimpse at the hardware used, which includes an Nvidia Jetson TX2. [Tegwyn] plans to capture even more images to refine the model and boost it up from the 50 to 60% confidence level to something that will allow for the remediation phase of the project, which apparently involves lasers. Although he’s willing to entertain other methods of disposal; perhaps a salt-shooting turret gun?

This isn’t the first garden-tending project [Tegwyn] has tackled. You may recall The Weedinator, his 2018 Hackaday Prize entry. This slug buster is one of his entries for the 2019 Hackaday Prize, which was just announced. We’re looking forward to seeing the onslaught of cool new projects everyone will be coming up with.

53 thoughts on “But Can Your AI Recognize Slugs?

  1. Yes, as Dan say, salt gun seems the most likely means of dispatch at the moment …. unless people have any better ideas? Personally, I’d rather have some kind of catapult to launch said slug into a suitable near earth orbit, but that may be too much of technical challenge. What is the ethics of slug destruction and when does it become ‘unsportsmanlike’?

      1. It’s possible – you’d need a robot arm or something to pick or suck up the slugs into a bucket and then transport them to the duck enclosure. Ducks randomly roaming around your crops will most likely eat more of the crops than the slugs.

          1. This is very true. We set up a night vision camera for a hedgehog living in our hedge. In addition to some cute videos, we got amazing time-lapses of slugs zooming around all night long, where there are none to be seen during the day.

          2. Ah, and there’s the rub. Last year I discovered slugs in my strawberry patch. :( That reminds me, it’s likely time to bust out the slug bait/poison again…

    1. Get a few Indian runner ducks and save yourself the expense and time messing with AI. Two or three of those ducks will reliably find and eradicate all snails in a huge radius – they are crazy after them. And you get eggs as a bonus (it is not a meat breed).

  2. My garden was infested by slugs… until a hedgehog decided to come along… and eats now a lot of pests, without ruining our lettuces. So maybe hire a hedgehog to train your IA ;-)

    1. You might be implying some kind of hedgehog breeding program? It is possible, as is breeding your own nematode worms, which might be easier? Hedgehogs are pretty rare where i live – we used to see lots of them squashed on the roads, but not any more. Either they have got wise to cars or they are heading towards extinction. I blame modern farm practices where all kinds of nasty chemicals are used to kill bugs and seemingly having a big impact on those that rely on the bugs for a living.

      1. “heading towards extinction”

        Sadly it’s this.
        They have a pretty rotten life of it in the modern world::

        Removal of hedgerows
        Attacked by cats & dogs
        lawn mowers and other mechanical torture
        and road kill as you mention
        constantly living with ticks and lice
        getting infected, eaten from the inside out by various bugs

        Yet they are prety cute and helpful pest eaters.
        So please, do what you can for the erm “furry” critters.

    2. Why can’t they just share the hedge?

      Hedgehogs have a hard time of it. All the better one can do to give them a little home and look after them. Taken a fair few hogs to a local not for profit org to get them looked after and have the garden setup to encourage the little guys.

  3. The easiest method I’ve seen for disposing of slugs is to leave out shallow dishes full of beer. You might argue over the ethics of this, however, and say it’s unnecessary cruelty to the beer.

    1. The ethics is a serious matter – where do we humans draw the line? Is it ok to kill slugs by impaling them with salt? What animal is next up the intelligence / awareness list, maybe a mouse? Is it ok to inject a mouse with salt to kill it? What if the dose is too low and it causes suffering?

      1. I think the ethics question is important, but only in the context of not being cruel. Everything with a nervous system can feel pain, but I think there’s a point where the animal is just not equipped to process it emotionally. There’s a big difference between a slug and mouse, I think – I’ve seen mice suffer in traps, and it’s clear that they are aware of their fate. Invertebrates, on the other hand, seem not to have the neural equipment needed to suffer. Just my opinion, of course.

        Not that any of this means I’m opposed to killing something that needs killing. We had a mouse infestation in my pantry every winter in my old house, and I slaughtered mice wholesale with spring traps. If it’s a choice between losing hundreds of dollars worth of food or putting my family’s health at risk and a few cute little mice with twitchy noses, the mice go. As humanely as possible, of course. Same with the skunk that was harassing my chickens. Felt bad that I had to shoot the damn thing, but he was threatening my food. Always worth fighting for, in my opinion.

        So, slugicide? I have no problem with that, as long as it’s not unnecessarily cruel, risks no collateral damage, and serves a justifiable purpose. Protecting a food-producing garden is more than justified, I think.

      1. Perhaps skynet started out with slugs and then without a “guilt chip” didn’t think would be anything wrong with killing humans, otherwise it would just be “picking on the chickens”

  4. I could not find it again ( didn´t search very hard, actually ) , but a couple ( make ir some 10 or + ) years ago there was a project from a guy that was going to build a little robot that used slugs as fuel also.

    The slugs were going to be recognized due to they appearing very distinctvely in the Ultraviolet light, and then his robot would pick the slug, and dump it in a little “biological reactor” of sorts, that would generate energy to charge the batteries.

    As for the ethics of getting rid of slugs : well, gime me some easy way to keep them out of the garden and we can talk.

      1. Maybe yes. I seem to remember more pictures, and more data about the detecting mechanism and also on the “digester” parts. Maybe the original article to which the bbc one just mentions …

  5. Someone few years ago on Hackaday commented that you just need 2 wires of different metals, say copper and iron. When slugs contact both of them, current is developed that shocks them and makes them back off.

    How? Slime is electrolyte it appears. So they make their own battery acid for shocking themselves :)

    1. I’ve used two pieces of aluminum (duct) tape, separated by about 1 mm, with an “expired” 9 V batteries across them. Like an electric fence for slugs. Even like 5 V is enough to make them turn around. The batteries lasted a whole season.

      They seem to have a very strong sense of smell, and basil smells good to them, because they’d climb up repeatedly before giving up. They were not walking around randomly.

      x4 = one for each leg of the raised bed. If you’re farming in the ground, on the ground, it’s harder to encircle with live wires, so maybe you’ll need an AI slug-buster…

    2. When my parents discovered a slug problem, my dad took an electrical cord, cut in half, with two exposed prongs. Plugged in, it made for an interesting slug-prod. They would sort of cook and turn white, a bit like cooking eggs.

  6. Best way I’ve found to deal with slugs is to get up about 2:00am where they’re active, catch them and send to a public place. This is to avoid killing them, I find them as a noble animal. They don’t reproduce often so the technique is efective. The technology here can trigger an alarm so you can get up at the exact time.

  7. I have seen a photograph in a science book that shows a slug running up and over a razor blade, so much for egg shells. Chickens like slugs. A salt weapons are dubious at least, really frowned on now. Liquid household ammonia of the non sudsy type kills slugs, One shot and they are writhing to waste away. I have seen them slime their way out of a big dose of Morton’s finest grains. The salt does no good on the soil and plants, however the ammonia is fertilizer. Good riddance slugs, healthy plants. Squirt away! Easier to deploy on a robot assassin than an a salt weapon. Never get a visit from ATF agents.

    Listen to Riders in the Sky do the “salting of the slugs” for this traditional ballad-air. It’s on YT.

      1. Ammonium Nitrate It is the first two letters of of ANFO explosive. Depending on how much ammonium nitrate you buy and if you have no business using it, TSA (or other similar agencies in your country) might put you on a watch list.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.