docs: 📝 minor adjustments on readme and changelog
Signed-off-by: Onuralp SEZER <thunderbirdtr@gmail.com>
This commit is contained in:
parent
5b39c81035
commit
103669bf0f
39
README.md
39
README.md
|
|
@ -102,7 +102,9 @@ image = cv2.imread(...)
|
|||
detections = sv.Detections(...)
|
||||
|
||||
box_annotator = sv.BoxAnnotator()
|
||||
annotated_frame = box_annotator.annotate(scene=image.copy(), detections=detections)
|
||||
annotated_frame = box_annotator.annotate(
|
||||
scene=image.copy(),
|
||||
detections=detections)
|
||||
```
|
||||
|
||||
https://github.com/roboflow/supervision/assets/26109316/691e219c-0565-4403-9218-ab5644f39bce
|
||||
|
|
@ -137,14 +139,20 @@ for path, image, annotation in ds:
|
|||
|
||||
```python
|
||||
dataset = sv.DetectionDataset.from_yolo(
|
||||
images_directory_path=..., annotations_directory_path=..., data_yaml_path=...
|
||||
images_directory_path=...,
|
||||
annotations_directory_path=...,
|
||||
data_yaml_path=...
|
||||
)
|
||||
|
||||
dataset = sv.DetectionDataset.from_pascal_voc(
|
||||
images_directory_path=..., annotations_directory_path=...
|
||||
images_directory_path=...,
|
||||
annotations_directory_path=...
|
||||
)
|
||||
|
||||
dataset = sv.DetectionDataset.from_coco(images_directory_path=..., annotations_path=...)
|
||||
dataset = sv.DetectionDataset.from_coco(
|
||||
images_directory_path=...,
|
||||
annotations_path=...
|
||||
)
|
||||
```
|
||||
|
||||
- split
|
||||
|
|
@ -183,20 +191,33 @@ for path, image, annotation in ds:
|
|||
|
||||
```python
|
||||
dataset.as_yolo(
|
||||
images_directory_path=..., annotations_directory_path=..., data_yaml_path=...
|
||||
images_directory_path=...,
|
||||
annotations_directory_path=...,
|
||||
data_yaml_path=...
|
||||
)
|
||||
|
||||
dataset.as_pascal_voc(images_directory_path=..., annotations_directory_path=...)
|
||||
dataset.as_pascal_voc(
|
||||
images_directory_path=...,
|
||||
annotations_directory_path=...
|
||||
)
|
||||
|
||||
dataset.as_coco(images_directory_path=..., annotations_path=...)
|
||||
dataset.as_coco(
|
||||
images_directory_path=...,
|
||||
annotations_path=...
|
||||
)
|
||||
```
|
||||
|
||||
- convert
|
||||
|
||||
```python
|
||||
sv.DetectionDataset.from_yolo(
|
||||
images_directory_path=..., annotations_directory_path=..., data_yaml_path=...
|
||||
).as_pascal_voc(images_directory_path=..., annotations_directory_path=...)
|
||||
images_directory_path=...,
|
||||
annotations_directory_path=...,
|
||||
data_yaml_path=...
|
||||
).as_pascal_voc(
|
||||
images_directory_path=...,
|
||||
annotations_directory_path=...
|
||||
)
|
||||
```
|
||||
|
||||
</details>
|
||||
|
|
|
|||
|
|
@ -82,8 +82,10 @@ detections = sv.Detections.from_transformers(
|
|||
|
||||
```python
|
||||
import supervision as sv
|
||||
from segment_anything import sam_model_registry, SamAutomaticMaskGenerator
|
||||
|
||||
from segment_anything import (
|
||||
sam_model_registry,
|
||||
SamAutomaticMaskGenerator
|
||||
)
|
||||
sam_model_reg = sam_model_registry[MODEL_TYPE]
|
||||
sam = sam_model_reg(checkpoint=CHECKPOINT_PATH).to(device=DEVICE)
|
||||
mask_generator = SamAutomaticMaskGenerator(sam)
|
||||
|
|
@ -294,8 +296,14 @@ import supervision as sv
|
|||
image = ...
|
||||
key_points = sv.KeyPoints(...)
|
||||
|
||||
edge_annotator = sv.EdgeAnnotator(color=sv.Color.GREEN, thickness=5)
|
||||
annotated_frame = edge_annotator.annotate(scene=image.copy(), key_points=key_points)
|
||||
edge_annotator = sv.EdgeAnnotator(
|
||||
color=sv.Color.GREEN,
|
||||
thickness=5
|
||||
)
|
||||
annotated_frame = edge_annotator.annotate(
|
||||
scene=image.copy(),
|
||||
key_points=key_points
|
||||
)
|
||||
```
|
||||
|
||||
- Added [#1147](https://github.com/roboflow/supervision/pull/1147): [`sv.KeyPoints.from_inference`](https://supervision.roboflow.com/0.21.0/keypoint/core/#supervision.keypoint.core.KeyPoints.from_inference) allowing to create [`sv.KeyPoints`](https://supervision.roboflow.com/0.21.0/keypoint/core/#supervision.keypoint.core.KeyPoints) from [Inference](https://github.com/roboflow/inference) result.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
--8\<-- "CONTRIBUTING.md"
|
||||
--8<-- "CONTRIBUTING.md"
|
||||
|
|
|
|||
Loading…
Reference in New Issue