Code Monkey home page Code Monkey logo

yolo-video-detection-example's Introduction

YOLO video detection in the TouchDesigner

Description

This project demonstrate how to use custom ML model in the TouchDesigner. The solution consists from two components:

  1. Script TOP in the TouchDesigner.
  2. External process to process data.
sequenceDiagram
    participant T as TouchDesigner
    participant S as Shared memory
    participant P as Python external process
    T->>S: Send frame to shared memory
    S->>P: Read frame from shared memory
    P->>S: Process frame and write to shared memory
    S->>T: Read processed frame from shared memory

Requirements

  1. Python 3.9 or higher. It is more preferable to have same version as in the TouchDesigner.

How to run

Install prebuild package from PyPi

PyPI version

From source

Install dependencies

For GPU:

pip install -r. /requirements.gpu.txt

For CPU:

pip install -r. /requirements.cpu.txt

For development:

pip install -r ./requirements.dev.txt

Compile Cython extension

You need C compiler to compile extension.

Develop mode
pip install -e .
Binary distribution

To compile binary distribution:

python -m cibuildwheel --platform <your_platform>

Install binary distribution:

pip install ./dist/*.whl

Usecases

Video detection

Run:

python ./main.py -c <checkpoint_path> -i <video_path> -o <video_path>

With TouchDesigner

Run server processing:

python ./processing.py -p <path_to_model>

Open touch_designer.py in the TouchDesigner as script TOP.

yolo-video-detection-example's People

Contributors

kernela avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

yolo-video-detection-example's Issues

Boxes sometimes flickering in TouchDesigner

Hello,

First off, amazing work! I have been trying to find a way to implement Yolov8 in TouchDesigner for some time now.

My issue is that when I open TouchDesigner after executing the processing file, the boxes sometimes do not appear. If I adjust the threshold, the boxes will flicker on and off until I stop moving it. Sometimes, however, when I open TouchDesigner, everything works fine and the boxes show with the labels and score.

I was curious if you have any resolutions for this issue? Let me know if I am not being clear enough and I can add more detail.

Thanks

Untitled.video.-.Made.with.Clipchamp.mp4

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.