JetPack-4.6

This post summarizes how I set up my Jetson Nano with JetPack-4.6 and run my tensorrt_demos samples.

Share "JetPack-4.6"

Share on: FacebookTwitter

JetPack-4.5

This post summarizes how I set up my Jetson DevKits and run my tensorrt_demos samples.

Share "JetPack-4.5"

Share on: FacebookTwitter

Custom YOLOv4 Model on Google Colab

This is a tutorial about how to utilize free GPU on Google Colab to train a custom YOLOv4 model. I use the CrowdHuman dataset in this tutorial. The custom trained model could detect people (head and full body) pretty accurately.

Share "Custom YOLOv4 Model on Google Colab"

Share on: FacebookTwitter

Setting up Jetson Xavier NX

I just tried out my Jetson Xavier NX DevKit. Here is how I set it up for testing TensorRT inferencing and so on.

Share "Setting up Jetson Xavier NX"

Share on: FacebookTwitter

TensorRT YOLOv4

I extended my TensorRT ONNX YOLOv3 code so that it also supports YOLOv4 now!

Share "TensorRT YOLOv4"

Share on: FacebookTwitter

Setting Up a NGINX + Flask Server on GCP

This post is a brief note documenting how I set up a NGINX + Flask server using a Compute Engine on Google Cloud Platform (GCP).

Share "Setting Up a NGINX + Flask Server on GCP"

Share on: FacebookTwitter

Applying TensorRT on My tf.keras ImageNet Models

This post explains how I optimize my trained tf.keras ImageNet models with TensorRT. The main steps involve converting the tf.keras models to ONNX, and then to TensorRT engines.

Share "Applying TensorRT on My tf.keras ImageNet Models"

Share on: FacebookTwitter

JetPack-4.4 for Jetson Nano

This post summarizes the steps I applied to set up my Jetson Nano DevKit with JetPack-4.4 and run my tensorrt_demos samples.

Share "JetPack-4.4 for Jetson Nano"

Share on: FacebookTwitter

Verifying mAP of TensorRT Optimized SSD and YOLOv3 Models

I used 'pycocotools' to verify mean average precision (mAP) of TensorRT optimized Single-Shot Multibox Detector (SSD) and YOLOv3 models, to make sure the optimized models did not perform significantly worse in terms of accuracy comparing to the original (unoptimized) TensorFlow/Darknet models.

Share "Verifying mAP of TensorRT Optimized SSD and YOLOv3 Models"

Share on: FacebookTwitter

TensorRT ONNX YOLOv3

I created a TensorRT ONNX YOLOv3 demo based on NVIDIA's sample code.

Share "TensorRT ONNX YOLOv3"

Share on: FacebookTwitter

JetPack-4.3 for Jetson Nano

NVIDIA JetPack-4.3 was officially released on 2019-12-18. I tested it on my Jetson Nano DevKit as soon as I could.

Share "JetPack-4.3 for Jetson Nano"

Share on: FacebookTwitter

Displaying Images in TensorBoard

I tried to use various combinations of data augmentation when training Keras/TensorFlow ImageNet models. In this post, I shared how I verified the augmented images with TensorBoard.

Share "Displaying Images in TensorBoard"

Share on: FacebookTwitter

Speeding Up TensorRT UFF SSD

I implemented video pipeline for the TensorRT UFF SSD demo program. The resulting improvement on frames per second (FPS) is good.

Share "Speeding Up TensorRT UFF SSD"

Share on: FacebookTwitter

TensorRT UFF SSD

I created a TensorRT UFF Single-Shot Multibox Detector (SSD) demo based on NVIDIA's sample code. It runs extremely fast on Jetson Nano/TX2.

Share "TensorRT UFF SSD"

Share on: FacebookTwitter

Building TensorFlow 2.0.0 on Jetson Nano

Check out my latest script for building and installing tensorflow-2.0.0 on Jetson Nano and other Jetson platforms.

Share "Building TensorFlow 2.0.0 on Jetson Nano"

Share on: FacebookTwitter

Optimizing TensorRT MTCNN

I optimized my previous implementation of TensorRT MTCNN face detector. Overall, the optimized TensorRT MTCNN demo program runs 30~40% faster than the previous version. This post is about how I implemented the optimization.

Share "Optimizing TensorRT MTCNN"

Share on: FacebookTwitter

TensorRT MTCNN Face Detector

I finally make the TensorRT optimized MTCNN face detector to work on Jetson Nano/TX2. Again, I use Cython to wrap C++ TensorRT code so that I could do most of the MTCNN processing from python.

Share "TensorRT MTCNN Face Detector"

Share on: FacebookTwitter

Training Keras Models with TFRecords and The tf.data API

One of the challenges in training CNN models with a large image dataset lies in building an efficient data ingestion pipeline. Without that, the GPU's could be constantly starving for data and thus training goes slowly. In this post, I'm sharing my experience in training Keras image classification models with tensorflow's TFRecords and tf.data API. I think I train the models much more efficiently this way than reading original jpg files from the file system.

Share "Training Keras Models with TFRecords and The tf.data API"

Share on: FacebookTwitter

Testing TF-TRT Object Detectors on Jetson Nano

I tested TF-TRT object detection models on my Jetson Nano DevKit. I also compared model inferencing time against Jetson TX2.

Share "Testing TF-TRT Object Detectors on Jetson Nano"

Share on: FacebookTwitter

Building TensorFlow 1.12.2 on Jetson Nano

I wrote a script for building and installing tensorflow-1.12.2 on Jetson Nano. It should work for Jetson TX2 and other Jetson platforms as well.

Share "Building TensorFlow 1.12.2 on Jetson Nano"

Share on: FacebookTwitter

Running TensorRT Optimized GoogLeNet on Jetson Nano

In this post, I'm demonstrating how I optimize the GoogLeNet caffe model with TensorRT and run inferencing on the Jetson Nano DevKit. In particular, I use Cython to wrap C++ code so that I could call TensorRT inferencing code from python.

Share "Running TensorRT Optimized GoogLeNet on Jetson Nano"

Share on: FacebookTwitter

Setting up Jetson Nano: The Basics

I finally have time to try out NVIDIA Jetson Nano. I plan to document all the steps of setting up my Jetson Nano, starting from this post.

Share "Setting up Jetson Nano: The Basics"

Share on: FacebookTwitter

Sending LINE Notify Messages with Python

I'd like to share a very useful trick for edge AI devices: sending LINE Notify messages (whenever events are detected). I also share all source code within the post.

Share "Sending LINE Notify Messages with Python"

Share on: FacebookTwitter

Deploying the Hand Detector onto Jetson TX2

Building upon my previous tutorials, I demonstrate how to optimize a custom trained object detection model with TensorRT, and deploy it onto Jetson TX2.

Share "Deploying the Hand Detector onto Jetson TX2"

Share on: FacebookTwitter

Adapting the Hand Detector Tutorial to Your Own Data

This is a tutorial on how to adapt my 'hand detector' to other object detection tasks. You should be able to train your own models to detect other kinds of objects with very little change to my code.

Share "Adapting the Hand Detector Tutorial to Your Own Data"

Share on: FacebookTwitter

Training a Hand Detector with TensorFlow Object Detection API

This is a tutorial on how to train a 'hand detector' with TensorFlow Object Detection API. All code used in this tutorial are open-sourced on GitHub. Just follow ths steps in this tutorial, and you should be able to train your own hand detector model in less than half a day.

Share "Training a Hand Detector with TensorFlow Object Detection API"

Share on: FacebookTwitter

How I built TensorFlow 1.8.0 on Jetson TX2

This is a note for myself, documenting the nifty details about how I built tensorflow 1.8.0 pip wheel with TensorRT support on a Jetson TX2 flashed with JetPack-3.3.

Share "How I built TensorFlow 1.8.0 on Jetson TX2"

Share on: FacebookTwitter

TensorFlow/TensorRT Models on Jetson TX2

NVIDIA released tf_trt_models sample code for both image classification and object detection a while ago. I tested it and developed a real-time object detection script using TensorRT optimized TensorFlow models based on NVIDIA's code. I'd like to share the demo script here.

Share "TensorFlow/TensorRT Models on Jetson TX2"

Share on: FacebookTwitter

Kaggle 2018 Google AI Open Images - Object Detection Track

I participated in my first Kaggle competition, 'Google AI Open Images - Object Detection Track'. The result was not particularly good. Nonetheless I'd like to share the source code and write briefly about what I've learned.

Share "Kaggle 2018 Google AI Open Images - Object Detection Track"

Share on: FacebookTwitter

JetPack-3.3 for TX2

NVIDIA released JetPack-3.3 a couple of weeks ago. I updated my Jetson TX2 to this latest BSP, and could happily report that most of my previous posts worked fine on it.

Share "JetPack-3.3 for TX2"

Share on: FacebookTwitter

How to Do Real-time Object Detection with SSD on Jetson TX2

In this post, I'm demonstrating how to do real-time object detection with Single-Shot Multibox Detector (SSD) on Jetson TX2. Note that SSD runs much faster than my previous similar example of Faster R-CNN.

Share "How to Do Real-time Object Detection with SSD on Jetson TX2"

Share on: FacebookTwitter

Talk at GTC Taiwan 2018

I highlighted the main points of my GTC Taiwan 2018 presentation in this blog post. The key take-away is that it's possible to achieve real-time (>30 fps) object detection with good accuracy on Jetson TX2.

Share "Talk at GTC Taiwan 2018"

Share on: FacebookTwitter

Multi-threaded Camera Caffe Inferencing

Building upon my previous tegra-cam-caffe.py example, I developed a multi-threaded version of the script. In this post I'm sharing my design considerations behind this new tegra-cam-caffe-threaded.py script.

Share "Multi-threaded Camera Caffe Inferencing"

Share on: FacebookTwitter

Tegra Camera Recorder

This post is in response to a reader of my blog posts, who was trying to 'get Python OpenCV to write back to a gstreamer pipeline either into a file or into a video stream for web browsers'. As usual, I shared the full python code to demonstrate how to do that.

Share "Tegra Camera Recorder"

Share on: FacebookTwitter

Extending Keras' ImageDataGenerator to Support Random Cropping

Keras' ImageDataGenerator supports quite a few data augmentation schemes and is pretty easy to use. However it lacks one important functionality, random cropping. In this post I share how I implemented this missing piece.

Share "Extending Keras' ImageDataGenerator to Support Random Cropping"

Share on: FacebookTwitter

Keras InceptionResNetV2

With change of only 3 lines of code from my previous example, I was able to use the more powerful CNN model, 'InceptionResNetV2', to train a Cats vs. Dogs classifier.

Share "Keras InceptionResNetV2"

Share on: FacebookTwitter

Keras Cats Dogs Tutorial

In this post I demonstrated how to train a very powerful Keras image classifier with just a few lines of Python code. The code could be adapted to handle other image classification tasks very easily.

Share "Keras Cats Dogs Tutorial"

Share on: FacebookTwitter

Making Faster R-CNN Faster!

A while ago I wrote a post about how to set up and run Faster RCNN on Jetson TX2. In this post I demonstrate how to use a faster CNN feature extractor to speed up Faster RCNN while maintaining its object detection accuracy (mAP). More specifically, I replaced VGG16 layers with GoogLeNet in Faster RCNN and was able to reduce model inference time roughly by half.

Share "Making Faster R-CNN Faster!"

Share on: FacebookTwitter

JetPack-3.2 for TX2

NVIDIA formally released JetPack-3.2 around mid March. I finally got time to update my Jetson TX2 to this latest BSP release, and verified most of the stuffs I care about worked fine on it.

Share "JetPack-3.2 for TX2"

Share on: FacebookTwitter

YOLOv3 on Jetson TX2

Recently I looked at darknet web site again and surprising found there was an updated version of YOLO , i.e. YOLOv3. So I spent a little time testing it on Jetson TX2. Here is the result.

Share "YOLOv3 on Jetson TX2"

Share on: FacebookTwitter

Building and Testing 'openalpr' on Jetson TX2

Recently I needed to implement license plate recognition function on Jetson TX2. I managed to build 'openalpr' from source and had it working on JTX2. This post documents how I did it.

Share "Building and Testing 'openalpr' on Jetson TX2"

Share on: FacebookTwitter

Measuring Caffe Model Inference Speed on Jetson TX2

When deploying Caffe models onto embedded platforms such as Jetson TX2, inference speed of the caffe models is an essential factor to consider. I think the best way to verify whether a Caffe model runs fast enough is to do measurement on the target platform.

Share "Measuring Caffe Model Inference Speed on Jetson TX2"

Share on: FacebookTwitter

Faster R-CNN on Jetson TX2

In this post I demonstrate how to do real-time object detection with a pre-trained Faster R-CNN model on Jetson TX2. By combining my previous tegra-cam.py code and Faster R-CNN, I'm able to detect objects in live video with either JTX2 onboard camera, USB webcam or IP CAM.

Share "Faster R-CNN on Jetson TX2"

Share on: FacebookTwitter

YOLOv2 on Jetson TX2

I tested pre-trained YOLOv2 on Jetson TX2, and documented the result in the post.

Share "YOLOv2 on Jetson TX2"

Share on: FacebookTwitter

How to Capture Camera Video and Do Caffe Inferencing with Python on Jetson TX2

I extended my previous tegra-cam.py example by hooking up a Caffe image classification model into the video pipeline. The resulting code should be good for quickly verifying a newly trained Caffe image classification model, for prototyping, or for building Caffe demo programs with live camera input.

Share "How to Capture Camera Video and Do Caffe Inferencing with Python on Jetson TX2"

Share on: FacebookTwitter

How to Capture and Display Camera Video with Python on Jetson TX2

In this post I share how to use python code (with OpenCV) to capture and display camera video on Jetson TX2, including IP CAM, USB webcam and the Jetson onboard camera. This sample code should work on Jetson TX1 as well.

Share "How to Capture and Display Camera Video with Python on Jetson TX2"

Share on: FacebookTwitter

Training a Fish Detector with NVIDIA DetectNet (Part 2/2)

I trained a DetectNet model with the data I prepared from Kaggle's 'The Nature Conservancy Fisheries Monitoring' dataset. Here's the list of steps I employed for the training, as well as a brief discussion about the result.

Share "Training a Fish Detector with NVIDIA DetectNet (Part 2/2)"

Share on: FacebookTwitter

Training a Fish Detector with NVIDIA DetectNet (Part 1/2)

I took fish image data from Kaggle's 'The Nature Conservancy Fisheries Monitoring' competition, and wanted to train a 'fish detector' with it. I chose NVIDIA DetectNet as the underlying object detector. In this post I documented how I prepared fish image training data for DetectNet.

Share "Training a Fish Detector with NVIDIA DetectNet (Part 1/2)"

Share on: FacebookTwitter

How I Built My Own Deep Learning PC

I built my own deep learning PC for DNN/CNN training about 1 year ago. Here's how I did it.

Share "How I Built My Own Deep Learning PC"

Share on: FacebookTwitter

Trying out TensorRT on Jetson TX2

As I was learning how to use TensorRT to achieve best inference performance on Jetson TX2, I used my previously trained cats-dogs Caffe model for experiment. The result was good, as expected.

Share "Trying out TensorRT on Jetson TX2"

Share on: FacebookTwitter

Deep Learning Cats Dogs Tutorial on Jetson TX2

I ran the Deep Leanring Cats Dogs Tutorial code to train an AlexNet on Jetson TX2. This is the best Caffe and Pyhton tutorial I've come across so far. I highly recommend it to people who wants to learn Caffe.

Share "Deep Learning Cats Dogs Tutorial on Jetson TX2"

Share on: FacebookTwitter

Nintendo AI Agent Training in Action, Finally...

I finally managed to put everything together, and started training my AI Agent (DeepMind's DQN) to play 'Galaga' on Nintendo Famicom Mini. Hopefully the AI could learn in a couple of weeks to play significantly better than the random player so that I could report the progress then...

Share "Nintendo AI Agent Training in Action, Finally..."

Share on: FacebookTwitter

Letting a Random Agent Play Galaga

A random agent (player) playing Galaga can get an average score of 6314.3! Hopefully my AI agent could do much better than that after training.

Share "Letting a Random Agent Play Galaga"

Share on: FacebookTwitter

Galaga Game Environment

I integrated the vidcap, galaga and gpio modules and finalized a Galaga game environment API which is similar to xtari, the Atari game emulator.

Share "Galaga Game Environment"

Share on: FacebookTwitter

Using cuDNN to Speed Up DQN Training on Jetson TX1

I found it was quite easy to enable cudnn in Torch7. I was able to reduce DQN training time by 1/3 on Jetson TX1 with change of only a few lines of code.

Share "Using cuDNN to Speed Up DQN Training on Jetson TX1"

Share on: FacebookTwitter

Accessing Hardware GPIO in Torch7

I developd code to control GPIO outputs from Torch7. This should work for not only Jetson TX1 but other Linux platforms as well. The code could be extended to handle GPIO inputs too.

Share "Accessing Hardware GPIO in Torch7"

Share on: FacebookTwitter

Galaga (小蜜蜂)

I picked this Nintendo Famicom Mini game as my first target for the AI agent!

Share "Galaga (小蜜蜂)"

Share on: FacebookTwitter

Capturing HDMI Video in Torch7

I implemented a video capturing module in Torch7. This module calls V4L2 API (in C code) to fetch raw video data from the underlying video capture device. It then uses Lua FFI interface to pass the data to Lua/Torch7. The resulting data are Torch Tensors and could be displayed on screen with Torch7's image API.

Share "Capturing HDMI Video in Torch7"

Share on: FacebookTwitter

Nintendo Famicom Mini

Nintendo Famicom Mini, Japan's version of the NES Classic Edition.

Share "Nintendo Famicom Mini"

Share on: FacebookTwitter

Training DeepMind's DQN to Play 'Pong', the Atari Game

I made some modifications to 'DeepMind Atari Deep Q Learner' so that it could run on Jetson TX1. I then trained the DQN to play 'pong' on Jetson TX1 for a week. The result is good.

Share "Training DeepMind's DQN to Play 'Pong', the Atari Game"

Share on: FacebookTwitter

Booting Rootfs off SD Card on Jetson TX1

I build my TX1 software development environment on large SD Card. This approach has a number of benefits. I share how I build the SD Card image here.

Share "Booting Rootfs off SD Card on Jetson TX1"

Share on: FacebookTwitter

How to Install Torch7 on Jetson TX1

This article describes how I install Torch7 on Jetson TX1. Since Torch7 gets updated frequently and its building process on TX1 might break from time to time, I'll try to update this blog to include the latest necessary fixes/workarounds whenever I can.

Share "How to Install Torch7 on Jetson TX1"

Share on: FacebookTwitter

blog built using the cayman-theme by Jason Long. LICENSE