Giter Club home page Giter Club logo

yolo-object-detection-and-distance-measurement-with-zed-camera's Introduction

Yolo Object Detection and Distance Measurement with Zed camera

you can test object detection and distance measurement with zed camera

How to use

You need to run this script like that python zed.py If you use tensorRT yolo, You need to run this script like that python zed_trt.py You need to edit the codes in zed.py line according to yourself.

The default values for weight, config, names file and ZED camera ID are

    config_path = "yolov4-tiny.cfg"
    weight_path = "yolov4-tiny.weights"
    meta_path = "coco.names"
    svo_path = None
    zed_id = 0

Download the model file, for instance Yolov4-Tiny

wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v3_optimal/yolov4.weights

Making changes in the "zed.py" file

You need to edit the following lines in zed.py

Size should be changed according to image height and width value in .cfg file Default values are - width : 608, height : 608

98. model.setInputParams(size=(608, 608), scale=1/255, swapRB=True)

Run the application

To launch the ZED with YOLO simply run the script :

    python3 zed.py

The input parameters can be changed using the command line :

    python3 zed.py -c <config> -w <weight> -m <meta> -s <svo_file> -z <zed_id>

For instance :

    python3 zed.py -c yolov4-tiny.cfg -w yolov4-tiny.weights -m coco.names -z 1

For running with custom weights :

    python3 zed.py -c yolov4-custom.cfg -w yolov4-custom.weights -m obj.names -z 1

To display the help :

    python3 zed.py -h

that's all, if you have a zed camera you can easily find the distance of the objects you have detected

You can see how the program works in the gif below.

yolo-object-detection-and-distance-measurement-with-zed-camera's People

Contributors

mehmetokuyar avatar nilutpolkashyap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

yolo-object-detection-and-distance-measurement-with-zed-camera's Issues

PR to include command line arguments

Hi, I would like to open a pull request to include command line arguments in the code so that we can use custom weights file, cfg file, names file and svo path.

please let me know.

deep sort

Hello, how come there is no implementation file uploaded, how come I can't find a way how to reproduce out.avi

CAMERA NOT DETECTED

error while opening camera inside docker using pyzed, camera works with openCV.

I am already mapping devices /dev/video0 and using --privileged tag


    err = zed.open(init)
    if err != sl.ERROR_CODE.SUCCESS :
        print(repr(err))
        zed.close()
        print("here")
        exit(1)

error :CAMERA NOT DETECTED

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.