Coder Social home page Coder Social logo

kayagokalp / handtrack-rs Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 16.59 MB

A library for prototyping hand detection and tracking (bounding box) for rust

License: MIT License

Rust 100.00%
artificial-intelligence handtracking neural-networks rust tensorflow

handtrack-rs's People

Contributors

kayagokalp avatar

Stargazers

 avatar

Watchers

 avatar

handtrack-rs's Issues

Add license

Currently the repo does not have a license file, it should be added before initial release.

Add README

Need a simple README before releasing the first version

Implement resizing for `Image`

Currently the input image is used fed to the model directly. It could make sense to downsize the image first especially for the performance critical usage of this library (detection from real-time video).

Implement re-coloring for `Image`

Currently the input image is used fed to the model directly. It could make sense to re-color (to grayscale?) the image first especially for the performance critical usage of this library (detection from real-time video). I am not sure if this would improve performance of the detection speed wise and it should be tested first. This could also effect the detection performance.

Add basic CI checks

Add CI checks for:

  1. Running cargo test.
  2. Checking formatting violations.
  3. Checking linter warnings.
  4. Publishing step

Support and benchmark detection in video streams

As of now, I am only testing things with single images. Eventually handtrack-rs should be able to detect hands from a video stream. This probably requires #14 to be tackled first. It would be great to have some tests for video stream detection and provide some benchmark in the README.

Improve wording for the README

I wrote in a hurry :) and it can use some paraphrasing and little touch-ups.

ChatGPT provides the following output for this request:


handtrack-rs

Welcome to handtrack-rs, a Rust library for detecting hands in images! This library is inspired by handtracking and aims to provide a simple, easy-to-use API for detecting hands in real-time video.

Example

Here's an example of how to use the detect function:

let image = Image::from_file(project_dir).unwrap();

let score_threshold = 0.7f32;
let max_hands = 1;
let detection_opts = DetectionOptions::new(max_hands, score_threshold);

let detection = detect(image, detection_opts).unwrap();

let detection_box = &detection[0];

The detect function takes in an Image and DetectionOptions, allowing you to specify the maximum number of hands to detect and a score threshold for classifying an object as a hand.

Contribution

This library is still a work in progress and contributions are welcome! To contribute, please make sure to run cargo clippy, cargo fmt, and cargo test checks and ensure that Cargo.toml dependencies are in alphabetical order.


I think it looks good but will leave this open for now and update the README once I have more features.

Change the `detect()` signature to accept a `Model`

Currently detect() directly uses frozen inference graph and does not allow users to specify the model themselves. This is not ideal as it means reading the model for each detection. This can be improved greatly by simply taking the model loading/creating part out of the detect() function and accept it as a parameter.

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.