GithubHelp home page GithubHelp logo

lddl / rust-road-traffic Goto Github PK

View Code? Open in Web Editor NEW
15.0 2.0 3.0 150.04 MB

Vehicle counting/tracking and speed estimation

Rust 94.33% Makefile 4.56% HTML 0.91% JavaScript 0.10% Shell 0.11%
darknet yolov4 yolo-tiny object-detection opencv4 opencv vehicle-detection darknet-yolo opencv-rust yolov8

rust-road-traffic's People

Contributors

lddl avatar

Stargazers

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

Watchers

 avatar  avatar

rust-road-traffic's Issues

[FEATURE REQUEST] REST

Is your feature request related to a problem? Please describe.
Consider REST side for this application.
Server should response with something like this:

{
    "data": [
        {
            "polygon_id": "UUID_v4",
            "period_start": "UnixTimestampUTC",
            "period_end": "UnixTimestampUTC",
            "statistics": [
                {
                    "vehicle_type": "car",
                    "sum_intensity": 100500,
                    "avg_speed": 45.15
                },
                {
                    "vehicle_type": "truck",
                    "sum_intensity": 200600,
                    "avg_speed": 53.12
                }
            ]
        }
    ]
}

Describe the solution you'd like and provide pseudocode examples if you can
Take actix and implement REST side

Describe alternatives you've considered and provide pseudocode examples if you can
nope

Additional context

  1. I'll struggle a bit with reference passing (due Im' Rust novice)
  2. Need to add example (cURL)

[FEATURE REQUEST] Headway calculation

Is your feature request related to a problem? Please describe.

Headway is the time that elapses between the arrival of the first vehicle (leading) and the second vehicle (following) at the specific point.

Describe the solution you'd like and provide pseudocode examples if you can

When some virtual line registered vehicle for the first time then register the timestamp. Then subsequently record timestamps differences and calculate average headway

It is needed to reconsider output JSON structure for REST API and Redis publisher

Additional context

  • headway should be reported in units of seconds
  • headway should not be calculated when there is no virtual line for zone
  • it is needed to be specified in documentation that too large virtual line could register multiple vehicles at once (so they are neighbors, not leader-follower) therefore calculation could lead to incorrect results interpretation
  • should export this parameter to REST API and Redis publisher
  • headway could not be estimated for specific class but for all vehicles types

[FEATURE REQUEST] Statistics by any transport type

Is your feature request related to a problem? Please describe.
Statistics is measured by all types of vehicle currently.
Would be great to have detalied information for certain type of vehicle ("car", "motorbike", "bus", "train", "truck")

Describe the solution you'd like and provide pseudocode examples if you can
Add hashmap to polygon to store following data ('vehicle_type_1': {avg_speed: value, sum_intensity: value}, 'vehicle_type_2'....)

Describe alternatives you've considered and provide pseudocode examples if you can
nope

Additional context
nope

[FEATURE REQUEST] Export events information to Redis

Is your feature request related to a problem? Please describe.
Currently only aggregated statistics could be exported to Redis.
I'd like to see a optional export of detection events in such form:

{
"event_id": some unique ID (e.g. UUID v4),
"event_time": UnixTimestamp or RFC3339 o ISO8601
"class_id": ID of class (or may be label? Need to investigate common needs)
"bbox": bounding box corresponding to real image size
"speed": estimated speed
"control_zone": ID of control zone or just rectangle or all zone parameters?
"virtual_line": Parameters of virtual line (#16)?
"track": Set of points corresponding to real image coordinates before image resizing (same as bbox)
"timestamps": UnixTimestamps correspondings to set of points in track
}

Additional context
Before implementation need to deeply consider event data.
Should we just register only crossing zone events (so filter any random detection) or any object detection (probably overkill)?

[FEATURE REQUEST] Docker container for quick start

Is your feature request related to a problem? Please describe.
Most of time it is time consuming to install all dependencies to the operation system. I think we need Docker container

Describe the solution you'd like and provide pseudocode examples if you can
I see three possible container currently:

  • CPU based
  • CUDA based
  • Jetson based (should be almost the same as CUDA but with some adjustments)

Additional context
I am not that Docker guy, so I'll work on this when I've free time

YoloV8, Hough lines, ONNX support?

Hey there,

First off, hats off for creating such a fantastic product! ๐Ÿš€

Just a couple of thoughts:

Any chance we could see support for newer Yolo versions or importing onnx files?
How about integrating Hough lines detection to save us from manually drawing those boxes?

[MINOR IMPROVEMENT] Use one of Kalman filters implementation

Is your feature request related to a problem? Please describe.
There are two Kalman filter's implementations currently.
I guess it could lead to some misunderstandings what is actually used for blob tracking.

Describe the solution you'd like and provide pseudocode examples if you can
Drop redundant and unnecessary code from kalman subdirectory

Additional context
I guess we should keep custom KF implementation via nalgebra and drop OpenCV's one.

[FEATURE REQUEST] Publish to Redis

Is your feature request related to a problem? Please describe.
Whould be cool to have ability to publish statistics data to Redis

Describe the solution you'd like and provide pseudocode examples if you can
*, Initialize redis publish channel in application startup (and do authentification if needed)

Describe alternatives you've considered and provide pseudocode examples if you can
nope

Additional context
Do not forget to add option to *.toml configuration file

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.