📜 ⬆️ ⬇️

How to wean the neighbor's cat to shit on the lawn: use machine vision and deep learning

To discourage the cat from the habit of leaving "gifts" on the lawn, you can use different methods: snares for small animals, homemade traps from the boxes with bricks on the lid and the lure inside, popular methods like garlic-coated citrus peels. Finally, you can sit all day with a sneaker in your hand.

Nvidia's engineer believes that doing so with neighbors' animals is somehow not neighborly. In addition, he wanted to try neural networks in practice. Therefore, he used a more advanced method: he took the Nvidia Jetson TX1 board, the Foscam IP camera, the Particle Photon development board connected to the relay, and the lawn home watering system. Cats are wet - but alive and healthy.

image

Cats are characterized by territorial behavior, and their territory does not coincide with the land of the owner. Cats mark the territory, and often go on the border areas. Interestingly, such border areas can divide several animals in time. Dumping them away from such behavior is difficult: despite the excellent memory, it is difficult to get the cat to associate the owner of the site with the site itself. Self-destructive methods are not only unprofitable, but also ineffective - new cats will come to the vacant territory.
')
Nvidia engineer Robert Bond has developed his own method of dealing with "gifts" on the lawn. He used the deep learning neural network and the Jetson TX1 development platform for recognizing cats and turning on the irrigation system. “My wife loves our garden, and it must be neat and clean,” says a 65-year-old software developer.

The IP camera Foscam FI9800P looks at the front yard and monitors the changes. If there is movement, it sends FTP 7 shots with a resolution of 640 × 480, one per second. They are received by the Jetson TX1 board, which is constantly ready to take images and pass them through the Caffe deep learning neural network.

image

A Wi-Fi access point has been set up to receive a photo for processing and send a watering command to Jetson. A small USB hub and a SATA solid state drive are connected to Jetson. An engineer stuck two “whistles” into the hub to communicate with the keyboard and mouse. On SSD, Bond installed Caffe using a recipe from JetsonHacks . The neural network works on CUDA seventh version. Bond recommends using CEVA Deep Neural Network to save memory.

image

After going through several neural networks, the engineer focused on Fully Convolutional Network for Semantic Segmentation (FCN). The Jetson Fcn32 works well, taking up just over 1 GB of memory, runs in just 10 seconds, and works with a 640 × 480 image in about a third of a second.

On a computer with GTX Titan, Bond trained the neural network with photos of cats found on the Internet. There were some curiosities - once the neural network took the shadow of a cat and soaked Bond.

When the deep learning system learns in a moving cat object, it gives the command to the Particle Photon board, which is working with a relay connected to the irrigation system. Right on the perforated cardboard base - Photon, on the left - the relay. When you receive the desired command, the relay closes, including a seal bath for two minutes.

image

Examples of the system are presented in the images. First, the cat gets into the field of view of the camera that takes the photo. In the second photo we see the heels of a cat - he drenched in water runs away from the yard. No hazardous chemicals, no snares and traps that can harm a cat, no stick shots and shoe throws. Only clean water.

image

image

As the motherboard manufacturer Jetson emphasizes , the entire project took about 10-15 hours of work. The system can already determine the location of cats. Bond plans to use the possibilities in the software and bring the project to a point attack.

In the past, there have been similar projects where animals are recognized and scared away. Blender Defender is something similar, but for protection from the domestic cat of flowers and other useful and necessary things in the house. The name is associated with a blender, which is included when a cat jumps into the field of view of the camera and jumps onto a table or cabinet. Bonus comes strobe.



image

A similar system was developed in 2012 by Kurt Grandis. He had a computer vision system that helped to shoot a squirrel with a Nerf water gun. The author of this project used the open-source computer vision library OpenCV.

image

An unexpected shower helps to fight not only with cats and squirrels - but also with people. Unfortunately, this is a completely manual system, but it can be done using the same tools that Robert Bond used.

Source: https://habr.com/ru/post/395821/


All Articles