Ruff format docstring Python code (#15792)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
c1882a4327
commit
d27664216b
63 changed files with 370 additions and 374 deletions
|
|
@ -82,7 +82,7 @@ Without further ado, let's dive in!
|
|||
```python
|
||||
import pandas as pd
|
||||
|
||||
indx = [l.stem for l in labels] # uses base filename as ID (no extension)
|
||||
indx = [label.stem for label in labels] # uses base filename as ID (no extension)
|
||||
labels_df = pd.DataFrame([], columns=cls_idx, index=indx)
|
||||
```
|
||||
|
||||
|
|
@ -97,9 +97,9 @@ Without further ado, let's dive in!
|
|||
with open(label, "r") as lf:
|
||||
lines = lf.readlines()
|
||||
|
||||
for l in lines:
|
||||
for line in lines:
|
||||
# classes for YOLO label uses integer at first position of each line
|
||||
lbl_counter[int(l.split(" ")[0])] += 1
|
||||
lbl_counter[int(line.split(" ")[0])] += 1
|
||||
|
||||
labels_df.loc[label.stem] = lbl_counter
|
||||
|
||||
|
|
|
|||
|
|
@ -248,9 +248,9 @@ Learn more about the [benefits of sliced inference](#benefits-of-sliced-inferenc
|
|||
Yes, you can visualize prediction results when using YOLOv8 with SAHI. Here's how you can export and visualize the results:
|
||||
|
||||
```python
|
||||
result.export_visuals(export_dir="demo_data/")
|
||||
from IPython.display import Image
|
||||
|
||||
result.export_visuals(export_dir="demo_data/")
|
||||
Image("demo_data/prediction_visual.png")
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue