Cool new AI developer kit by Nvidia - Jetson Nano

getting started with live image recognition


Author: Ashish Menkudale Published on: January 10, 2021

The NVIDIA® Jetson Nano 2GB Developer Kit is ideal for learning, building, and teaching AI and robotics—built for creators and priced for everyone. With a familiar Linux environment, easy-to-follow tutorials, and ready-to-build open-source projects created by an active community, it’s the perfect tool for learning by doing.

The important feature that differentiates Nano from popular Raspberry pi/ pi 4 is it’s processor - quad-core ARM Cortex-A57 64-bit @ 1.42 GHz which is unlike Raspeberry Pi’s Broadcom BCM2711 chip CPU is a 128-core Maxwell GPU. This makes Jetson Nano much more suitable for the AI / ML projects.

What’s this post about

I always wanted to get my hands on Raspberry Pi and build fun projects with sensors or just to use it as IoT device and figure out how the data transfer can be orchestrated over UDPs.

During Pandemic, due to remote working, I got some more time in hands, while looking for Raspberry Pi, I came across this newly developed Jetson Nano 2GB. In future I intend to build little more complex projects, so I chose to go with the Jetson nano (4GB).

This post is about initial setup, peripheral components required to ge started with image recognition related projects.

Components

Jetson nano Jetson Nano Developer Kit Single Board Computer for AI Development - B01 Version.

Power supply Charger 5V 2A 2.5A 3A 3.5A

Storage SanDisk 128GB Extreme microSDXC UHS-I Memory Card with Adapter - Up to 160MB/s, C10, U3, V30, 4K, A2, Micro SD - SDSQXA1-128G-GN6MA

Sandisk card reader SanDisk - SDDR-B531-GN6NN MobileMate USB 3.0 microSD Card Reader - SDDR-B531-GN6NN Black

Wifi module Waveshare AC8265 Wireless NIC Module for Jetson Nano Supports 2.4GHz / 5GHz Dual Band WiFi and Bluetooth 4.2

Heat resistant tape Heat Tape for Sublimation for Heat

Cooling fans DC 5V Cooling Fan - This is not a good fit, It works but a modification is required at the connecctor pin.

Depth Stereo Vision Dual camera module IMX219-83 Stereo Binocular Camera Sensor Module 3280x2464 8MP AI Depth Stereo Vision Dual IMX219 Supports Jetson Nano Developer Kit B01 / Raspberry Pi CM3/CM3+ Compute Module POE IO Board @XYGStudy

Board architecture, Camera, and wifi module connection

GPIO Pins

Camera connection Wiki

More info on IMX setup.

wifi module connection

Checking camera connection

We will need v4l-utils installed.


$ sudo apt-get update

$ sudo apt-get install v4l-utils

If the GPIO pins are connected properly, we can try list devices,

Getting started with image recognition

Setup complete

Simply follow instructions on nvidia blog to install various ready trained image recognition frameworks through jetson nano interface here

Make modification to detection.py as your device names,

#!/usr/bin/python3
#
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#

import jetson.inference
import jetson.utils

net = jetson.inference.detectNet("ssd-mobilenet-v2", threshold=0.5)
camera = jetson.utils.videoSource("csi://0")      # '/dev/video0' for V4L2
display = jetson.utils.videoOutput("display://0") # 'my_video.mp4' for file

while display.IsStreaming():
	img = camera.Capture()
	detections = net.Detect(img)
	display.Render(img)
	display.SetStatus("Object Detection | Network {:.0f} FPS".format(net.GetNetworkFPS()))
  

I am only 73% person and my bike is scissors due to orientation.

Maybe my tee-shirt is too baige to get missclassified as a cat.

Also, check out awesome community projects here https://developer.nvidia.com/embedded/community/jetson-projects

I am excited to try out projects.