Tag Archives: AI

Jetson Xavier NX Lesson 15: Training the Face Recognition Program to Recognize People

In this video lesson we should you a simple method to train our face recognizer on larger data sets. We use the python os.walk command to step through, and train automatically on all the training images in our folder. We then show how to store our training set to our SD card using the pickle utility. This allows us to train once, and use the trained model over and over.

For your convenience, the code below is what we developed to allow training our face recognition model.

Then this is a simple program that loads the trained model, and uses it to recognize people in unknown images.

 

Jetson Xavier NX Lesson 14: Face Recognition and Identification on NVIDIA Xavier NX

In this video lesson we show you how to train the NVIDIA Jetson Xavier NX to recognize faces, and then demonstrate finding those faces in a new unknown image.  We show step by step instruction in this easy to follow tutorial. We develop two python programs. The first one simply finds the faces in an unknown image, and the second program actually identifies the known faces. For your convenience, the code is included below.

Simple face detection Python code:

This next python program will learn faces, and then recognize them in new images.

 

Jetson Xavier NX Lesson 12: Intelligent Scanning for Objects of Interest

In this Video Tutorial we show how a camera on a pan/tilt control system can be programmed to search for an object of interest, and then track it when found.  Our system has two independent camera systems, and each can track a separate item of interest independently. The code is written in python, using the OpenCV library. The video takes you through the lesson step-by-step, and then the code is included below for your convenience.

If you want to play along at home, we are using the Jetson Xavier NX, which you can pick up HERE. You will also need to of the bracket/servo kits, which you can get HERE, and then two Raspberry Pi Version two cameras, available HERE.

 

Jetson Xavier NX Lesson 11: Independently Tracking Different Objects in Different Cameras

In this video lesson we show how two Raspberry Pi cameras can independently track to different objects of interest. As a demonstration, we track on two different colors, with pan/tilt servo systems adjusting to keep the object of interest in the center of the field of view.

In this project we are using the Jetson Xavier NX, which you can pick up HERE. You will also need to of the bracket/servo kits, which you can get HERE, and then two Raspberry Pi Version two cameras, available HERE.

 

AI on the Jetson Nano LESSON 52: Improving Picture Quality of the Raspberry Pi Camera with Gstreamer

In this lesson we want to pause and work on improving the image quality of the video stream coming from the Raspberry Pi camera. Right now, we are using a boilerplate Gstreamer string to launch the Raspberry Pi camera. In the video above we show how image quality can be drastically improved by tweaking the Gstreamer launch string.

Based on the Video above, we develop a greatly improved image quality by adjusting the Gstreamer launch string. Below, for you enjoyment is the code that will optimize picture quality.

First, this is the key line that results in excellent video quality:

And here is the overall code for running and displaying from the camera with the enhanced quality:

 

Now, once we have optimized the Gstreamer launch stream, we need to consider what path to move forward. In lesson #50 we saw that we could either control the camera using the NVIDIA Jetson Utilities, or we could control the camera normally from OpenCV. The advantage of our old OpenCV method is that it gives us more control of the camera. The advantage of the Jetson Utility method is that it appears to run faster, and for the rPi camera, have less latency. Below are two code examples for the two methods above. In the video lesson above, we will figure out the best strategy by tweaking the parameters in these two programas.

OPTION #1: Launch the cameras using OpenCV

OPTION # 2: Control Camera with NVIDIA Jetson Utilities Library