[Irene] Let’s Laser Cut

In preparation for the design review, I did a dry run for Sam. Jing and I went to Home Depot to pick up the plywood and a few other small hardware parts. I wrote the abstract, intro, requirements, architecture overview, and future work sections of the project paper. I ordered the remaining parts.

I responded to the design review feedback in the design document. After consulting a few instructors and people more knowledgeable than us in the machine vision field, I learned the following. In order of preference, our testing options are as follows: live animals, taxidermy, video feeds, printed high resolution pictures, and stuffed animals. My friend has a cat and Jing’s friend has a cat, but animals aren’t allowed on campus. Thus we will record footage of said cats interacting with the system and the system responding appropriately. For raccoons, we won’t be able to find live raccoons to test our system on. A taxidermy raccoon is as close as we could get to a live raccoon, but they are expensive. We have decided to look for videos similar to footage the camera would have actually captured of a raccoon. This is better than printed high resolution photos because the footage animal would replicate reality more closely than a video of a printed picture. Stuffed animals are not a good test of our machine learning algorithm because they don’t represent actual animals. A machine learning model that classifies stuffed cats as real cats would be considered a poorly train classifier.

There is no power metric because the device will be plugged into a wall outlet.

The next large milestone is to have version 1 of the door finished by March 22. I am a little anxious about finding power tools and small metal parts to construct the door. To alleviate that, I am proactively working on obtaining the right hardware from home depot and getting the plywood laser cut first. Whenever there is a delay in the construction of the door due to waiting on parts, I can context switch to writing the computer vision python program for motion detection and tracking.

I will have the door parts laser cut by the end of next week.

Feb 23: Team Status Update

We want to minimize the latency of our computer vision and ML algorithms because we want to be able to open the door for a valid cat as it is walking up to the door, without having the cat needing to wait. We estimate that the cat will be within range of the camera for a total of 1.2 seconds.
Through our research we determined that a Raspberry Pi would allow us to compute around 1 frame per second, which is too slow because we could potentially only receive one image during the 1.2 second span and this image might not give a good indication of whether the animal is valid or not. Similarly, we looked into Odroid which is a board similar to the Raspberry Pi, but much more powerful. This would likely yield us 2-3 frames per second. Still, we are unsure if this frame rate is fast enough and we want to be sure that we are going to get at least one good image for our algorithms.
We then looked into GPUs, which are processing units designed for image processing. Nvidia makes the most commonly-used and best documented GPUs. In addition, one of our group members has experience with Nvidia GPUs. We found the Jetson family, which are GPUs created for the embedded systems world. Specifically, we chose the Jetson TX2, which has 256 Cuda cores, because based off of our research we will be able to process 15 frames per second. Furthermore, Nvidia has a library called TensorRT, which compliments TensorFlow. This library can be used in conjunction with TensorFlow to optimize the ML algorithm computation for Nvidia GPUs. We will be using this to improve the latency of our algorithm.

To implement motion detection, we first can store a weighted average of previous frames and call this our “background frame.” With the weighted average, the script can dynamically adjust to the background, even as the time of day changes along with the lighting conditions. Then we compare the background frame to the current frame by subtracting. If the delta is above a certain threshold, then we have detected motion as a substantial difference in the image. We know where the motion occurred in the frame, so we can crop that part of the image out. On the other hand, tracking involves comparing adjacent frames to figure out what moved where. So even if there are two moving objects in a frame, we can figure out what moved where.

Instead of using an ultrasonic sensor, a PIR sensor will be mounted to the bottom of the door on the indoor side in order to know when the door needs to open for a cat wanting to exit the house. The camera will be mounted on the top of the outdoor side and angled downwards. The camera will be used in determining when the door needs to open for a cat wanting to enter the house. A door switch will be used for when the servo needs to lock after a cat has finished entering or exiting the house.
Passive infrared sensors detect changes in infrared radiation. All objects with a temperature above absolute zero emit heat energy in the form of radiation, so a PIR sensor can be used to sense movement of people, animals, or other objects.

[Irene] So Many Diagrams

This week, I put together diagrams to organize our thoughts and make sure we’re all on the same page about interconnections. First, I drew the door design. In a moment of panic, I thought that the servo would not be strong enough to lift a wooden panel, so I changed it to a flappy door design:

Then a mechanical engineering friend told me to redo the calculations and I realized that kg-cm means kg force x centimeter distance. So our 10kg-cm servo can lift 2kg at 5cm radius. So we’re back to the lifting door design.

I learned that it is important to have consistent lighting for machine vision. I selected an LED that content creators on Youtube often use for filming. It will be connected to a power relay that is controlled by the jetson. An alternative lighting mechanism would be IR lighting. IR wavelengths of 850nm and 940nm (also called NIR – Near InfraRed) are commonly used in machine vision. IR reduces color of objects, glare, and reflections. IR has a longer wavelength than visible light which usually results in a greater transmission of light into a material through materials like paper, cloth and plastic. IR wavelengths react differently on materials and coatings than visible light, so certain defects and flaw detection can be identified with IR where visible light did not work. One drawback would be that IR lighting changes the color of the cats fur in the image and therefore, our machine learning model would have to be trained on IR images. This dataset is hard to find.

Here are the interconnections between all the parts, along with the software we need to write:

And an events diagram for what happens after what, which will be converted into a flowchart of images:

I some did reading on computer vision, specifically motion detection and tracking. Basically, we can detect motion by taking the average of the past ten frames and comparing it to the current frame. Read the team status update for more details!

Onwards to design review!

Irene