Giter Site home page Giter Site logo

dt-object-detection's Introduction

dt-object-detection

Duckietown Project: Real Time Object Detection with Tracking

This is complete object detection package for real-time object detection on duckietown stack.

This package combine deep learning based object detector along with object tracking using Kalman Filter.

I see you Duckies!

1 2 3 4

Here are the online videos to watch: Simualtor, Real-robot

Seting-Up the Laptop

Setup your laptop using the documentation available at duckietown-manual

Running the object detector node

Downloading weights

You can download the weights from drive and put them in object_detection/include/object_detection/weights

Building and Running

dts exercises build
dts exercises test -b $robot_name --local
dts exercises test --sim

In the package object_detection/config/default.yaml you can specify which architecture to use, and other configuration.

After this you can see the object detection on the topic ~duckie_image. Also you can see object location in robot frame, which can be used for planning and obstacle avoidance, see topic ~object_projection.

Training Faster-RCNN

cd utils
python3 train.py -name $exp_name -config config.yaml -mode train

You can use the config.yaml which you can finf in ./include/object_detection/faster_rcnn/ to specify the datset path, weights saving path and other model hyper-parameters. The faster-rcnn code is inspired from the structure of detectron2

Run inference on the jetson nano on Yolov5

sudo apt-get install linux-headers-generic build-essential dkms
sudo apt-get install libffi-dev build-essential git apt-utils 
sudo apt-get install python-dev python-pip python3-dev python3-pip python3-venv python3-setuptools python3-pkg-resources

pip3 install cython

Install missing libraries before using pytorch, numpy, scipy:

sudo apt-get install gfortran libblas-dev liblapack-dev libjpeg-dev zlib1g-dev libopenblas-base libopenmpi2 

Upgrade and install these packages:

pip3 install --upgrade numpy scipy
pip3 install matplotlib, tqdm, Pillow

Download and Install Pytorch==1.6.0 from this prebuilt binary for Jetpack 4.4/4.4.1.

Verify Pytorch installation using these commands.

If error comes during import, install relevant pip libraries.
In case of missing .so files, use apt-file search for installing missing files.

After verifying pytorch installation, install torchvision:

git clone https://github.com/pytorch/vision.git
cd vision
git checkout v0.7.0
python3 setup.py install

jetson_clocks turn on:

sudo jetson_clocks

since htop is not available for nano. Use jtop after installing this package:

sudo apt-get install jetson-stats 

YOLOv5s

clone this repo on the jetson nano/raspberry pi

git clone https://github.com/burglarhobbit/yolov5.git

Download weights

dt-object-detection's People

Contributors

burglarhobbit avatar dishank-b avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.