From a2dbe9e53a0d59bd33e2b1e54f67257329e40b41 Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Fri, 29 Dec 2023 00:24:40 +0300 Subject: [PATCH] docs(example): readme.md usage fixes feat: default video set to people-walking.mp4 output to output.mp4 fix: re-create requirements.txt(fix end of line corruption) Signed-off-by: Onuralp SEZER --- examples/heatmap_and_track/README.md | 13 ++++++------- examples/heatmap_and_track/requirements.txt | Bin 51 -> 32 bytes examples/heatmap_and_track/script.py | 10 ++++++++-- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/examples/heatmap_and_track/README.md b/examples/heatmap_and_track/README.md index 4cf1f2bc..c2339956 100644 --- a/examples/heatmap_and_track/README.md +++ b/examples/heatmap_and_track/README.md @@ -33,11 +33,10 @@ supervision package for multiple tasks such as drawing heatmap annotations, trac - `--source_weights_path`: Required. Specifies the path to the weights file for the YOLO model. This file contains the trained model data necessary for object detection. -- `--source_video_path`: Required. The path to the source video file that will be +- `--source_video_path` (optional): The path to the source video file that will be analyzed. This is the input video on which crowd analysis will be performed. -- `--target_video_path` (optional): The path to save the output video with annotations. -If not specified, the processed video will be displayed in real-time without being -saved. +If not specified default is `people-walking.mp4` from supervision assets +- `--target_video_path` (optional): The path to save the output.mp4 video with annotations. - `--confidence_threshold` (optional): Sets the confidence threshold for the YOLO model to filter detections. Default is `0.3`. This determines how confident the model should be to recognize an object in the video. @@ -54,11 +53,11 @@ particularly in distinguishing between different objects. ```bash python script.py \ ---source_weights_path data/crowd_analysis.pt \ ---source_video_path data/crowd_analysis.mov \ +--source_weights_path weight.pt \ +--source_video_path input_video.mp4 \ --confidence_threshold 0.3 \ --iou_threshold 0.5 \ ---target_video_path data/crowd_analysis_result.mov +--target_video_path output_video.mp4 ``` ## © license diff --git a/examples/heatmap_and_track/requirements.txt b/examples/heatmap_and_track/requirements.txt index 73963c75320eef14509a4138e36ce4c0fa5f302a..ffc73e1f2a44fa4e96aab1e284c578d306d89b2d 100644 GIT binary patch literal 32 ncmXReEl4dY%Ph{!&x=khE>0~ej^!%NDJe?KsVvD%F6IIN+`$az literal 51 ycmezWub82fp@1Qkp@^Z3A(NpPi1Qip7`T9 str: + download_assets(VideoAssets.PEOPLE_WALKING) + return VideoAssets.PEOPLE_WALKING.value def heatmap_and_track( @@ -106,13 +112,13 @@ if __name__ == "__main__": ) parser.add_argument( "--source_video_path", - required=True, + default=download_video(), help="Path to the source video file", type=str, ) parser.add_argument( "--target_video_path", - required=True, + default="output.mp4", help="Path to the target video file (output)", type=str, )