diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ebaa8433..b7e4e998 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: - id: mixed-line-ending - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.14.10 + rev: v0.14.11 hooks: - id: ruff-check args: [--fix] @@ -31,7 +31,7 @@ repos: types_or: [ python, pyi, jupyter ] - repo: https://github.com/executablebooks/mdformat - rev: 0.7.17 + rev: 1.0.0 hooks: - id: mdformat additional_dependencies: diff --git a/README.md b/README.md index 4a81dd8a..5954e560 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ len(detections) from inference import get_model image = cv2.imread(...) - model = get_model(model_id="yolov8s-640", api_key=) + model = get_model(model_id="yolov8s-640", api_key="ROBOFLOW_API_KEY") result = model.infer(image)[0] detections = sv.Detections.from_inference(result) @@ -113,8 +113,8 @@ Supervision provides a set of [utils](https://supervision.roboflow.com/latest/da import supervision as sv from roboflow import Roboflow -project = Roboflow().workspace().project() -dataset = project.version().download("coco") +project = Roboflow().workspace("WORKSPACE_ID").project("PROJECT_ID") +dataset = project.version("PROJECT_VERSION").download("coco") ds = sv.DetectionDataset.from_coco( images_directory_path=f"{dataset.location}/train", @@ -122,10 +122,11 @@ ds = sv.DetectionDataset.from_coco( ) path, image, annotation = ds[0] - # loads image on demand +# loads image on demand for path, image, annotation in ds: # loads image on demand + pass ```
diff --git a/examples/count_people_in_zone/README.md b/examples/count_people_in_zone/README.md index 994ffec6..ab47b18f 100644 --- a/examples/count_people_in_zone/README.md +++ b/examples/count_people_in_zone/README.md @@ -21,7 +21,7 @@ https://github.com/roboflow/supervision/assets/26109316/f84db7b5-79e2-4142-a1da- cd supervision/examples/count_people_in_zone ``` -- setup python environment and activate it \[optional\] +- setup python environment and activate it [optional] ```bash python3 -m venv venv @@ -110,7 +110,7 @@ https://github.com/roboflow/supervision/assets/26109316/f84db7b5-79e2-4142-a1da- ```bash python inference_example.py \ - --roboflow_api_key \ + --roboflow_api_key "ROBOFLOW_API_KEY" \ --zone_configuration_path data/multi-zone-config.json \ --source_video_path data/market-square.mp4 \ --confidence_threshold 0.3 \ diff --git a/examples/heatmap_and_track/README.md b/examples/heatmap_and_track/README.md index 2551dadb..cf55f1f6 100644 --- a/examples/heatmap_and_track/README.md +++ b/examples/heatmap_and_track/README.md @@ -15,7 +15,7 @@ supervision package for multiple tasks such as drawing heatmap annotations, trac cd supervision/examples/heatmap_and_track ``` -- setup python environment and activate it \[optional\] +- setup python environment and activate it [optional] ```bash python3 -m venv venv diff --git a/examples/speed_estimation/README.md b/examples/speed_estimation/README.md index c2e6bcbd..eac4ef57 100644 --- a/examples/speed_estimation/README.md +++ b/examples/speed_estimation/README.md @@ -11,7 +11,7 @@ supervision package for multiple tasks such as tracking, annotations, etc. https://github.com/roboflow/supervision/assets/26109316/d50118c1-2ae4-458d-915a-5d860fd36f71 -> \[!IMPORTANT\] +> [!IMPORTANT] > Adjust the [`SOURCE`](https://github.com/roboflow/supervision/blob/e32b05a636dab2ea1f39299e529c4b22b8baa8da/examples/speed_estimation/ultralytics_example.py#L10) > and [`TARGET`](https://github.com/roboflow/supervision/blob/e32b05a636dab2ea1f39299e529c4b22b8baa8da/examples/speed_estimation/ultralytics_example.py#L15) > configuration if you plan to run a speed estimation script on your video file. Those must be adjusted separately for each camera view. You can learn more @@ -26,7 +26,7 @@ https://github.com/roboflow/supervision/assets/26109316/d50118c1-2ae4-458d-915a- cd supervision/examples/speed_estimation ``` -- setup python environment and activate it \[optional\] +- setup python environment and activate it [optional] ```bash python3.10 -m venv venv @@ -90,7 +90,7 @@ https://github.com/roboflow/supervision/assets/26109316/d50118c1-2ae4-458d-915a- ```bash python inference_example.py \ - --roboflow_api_key \ + --roboflow_api_key "ROBOFLOW_API_KEY" \ --source_video_path data/vehicles.mp4 \ --target_video_path data/vehicles-result.mp4 \ --confidence_threshold 0.3 \ diff --git a/examples/time_in_zone/README.md b/examples/time_in_zone/README.md index 5c91a80b..7210ef02 100644 --- a/examples/time_in_zone/README.md +++ b/examples/time_in_zone/README.md @@ -20,7 +20,7 @@ https://github.com/roboflow/supervision/assets/26109316/d051cc8a-dd15-41d4-aa36- cd supervision/examples/time_in_zone ``` -- setup python environment and activate it \[optional\] +- setup python environment and activate it [optional] ```bash python3 -m venv venv diff --git a/examples/tracking/README.md b/examples/tracking/README.md index 53b8a3e5..3c5144b5 100644 --- a/examples/tracking/README.md +++ b/examples/tracking/README.md @@ -14,7 +14,7 @@ detection and Supervision for tracking and annotation. cd supervision/examples/tracking ``` -- setup python environment and activate it \[optional\] +- setup python environment and activate it [optional] ```bash python3 -m venv venv @@ -79,7 +79,7 @@ detection and Supervision for tracking and annotation. ```bash python inference_example.py \ - --roboflow_api_key \ + --roboflow_api_key "ROBOFLOW_API_KEY" \ --source_video_path input.mp4 \ --target_video_path tracking_result.mp4 ``` diff --git a/examples/traffic_analysis/README.md b/examples/traffic_analysis/README.md index 29ed7168..097a8cd0 100644 --- a/examples/traffic_analysis/README.md +++ b/examples/traffic_analysis/README.md @@ -17,7 +17,7 @@ https://github.com/roboflow/supervision/assets/26109316/c9436828-9fbf-4c25-ae8c- cd supervision/examples/traffic_analysis ``` -- setup python environment and activate it \[optional\] +- setup python environment and activate it [optional] ```bash python3 -m venv venv @@ -101,7 +101,7 @@ https://github.com/roboflow/supervision/assets/26109316/c9436828-9fbf-4c25-ae8c- ```bash python inference_example.py \ - --roboflow_api_key \ + --roboflow_api_key "ROBOFLOW_API_KEY" \ --source_video_path data/traffic_analysis.mov \ --confidence_threshold 0.3 \ --iou_threshold 0.5 \