Skip to content

Commit

Permalink
fix(pre_commit): 🎨 auto format pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Mar 25, 2024
1 parent 15e17ad commit cf88cc0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions docs/how_to/detect_small_objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ status: new
This guide shows how to detect small objects
with the [Inference](https://github.com/roboflow/inference),
[Ultralytics](https://github.com/ultralytics/ultralytics) or
[Transformers](https://github.com/huggingface/transformers) packages using
[Transformers](https://github.com/huggingface/transformers) packages using
[`InferenceSlicer`](detection/tools/inference_slicer/#supervision.detection.tools.inference_slicer.InferenceSlicer).

<video controls>
Expand Down Expand Up @@ -104,8 +104,8 @@ size relative to the image resolution.

## Input Resolution

Modifying the input resolution of images before detection can enhance small object
identification at the cost of processing speed and increased memory usage. This method
Modifying the input resolution of images before detection can enhance small object
identification at the cost of processing speed and increased memory usage. This method
is less effective for ultra-high-resolution images (4K and above).

=== "Inference"
Expand Down Expand Up @@ -154,8 +154,8 @@ is less effective for ultra-high-resolution images (4K and above).

## Inference Slicer

[`InferenceSlicer`](detection/tools/inference_slicer/#supervision.detection.tools.inference_slicer.InferenceSlicer)
processes high-resolution images by dividing them into smaller segments, detecting
[`InferenceSlicer`](detection/tools/inference_slicer/#supervision.detection.tools.inference_slicer.InferenceSlicer)
processes high-resolution images by dividing them into smaller segments, detecting
objects within each, and aggregating the results.

=== "Inference"
Expand Down Expand Up @@ -199,7 +199,7 @@ objects within each, and aggregating the results.
def callback(image_slice: np.ndarray) -> sv.Detections:
result = model(image_slice)[0]
return sv.Detections.from_ultralytics(result)

slicer = sv.InferenceSlicer(callback = callback)
detections = slicer(image)

Expand Down Expand Up @@ -240,7 +240,7 @@ objects within each, and aggregating the results.
results = processor.post_process_object_detection(
outputs=outputs, target_sizes=target_size)[0]
return sv.Detections.from_transformers(results)

slicer = sv.InferenceSlicer(callback = callback)
detections = slicer(image)

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ You can install `supervision` with pip in a

---

Learn how to detect small objects in images
Learn how to detect small objects in images

[:octicons-arrow-right-24: Tutorial](how_to/detect_small_objects.md)

Expand Down

0 comments on commit cf88cc0

Please sign in to comment.