PyUpgrade 3.8 updates (#15941)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
ea13dc6208
commit
9ec8e9acbf
13 changed files with 25 additions and 25 deletions
|
|
@ -490,7 +490,7 @@ def convert_dota_to_yolo_obb(dota_root_path: str):
|
|||
normalized_coords = [
|
||||
coords[i] / image_width if i % 2 == 0 else coords[i] / image_height for i in range(8)
|
||||
]
|
||||
formatted_coords = ["{:.6g}".format(coord) for coord in normalized_coords]
|
||||
formatted_coords = [f"{coord:.6g}" for coord in normalized_coords]
|
||||
g.write(f"{class_idx} {' '.join(formatted_coords)}\n")
|
||||
|
||||
for phase in ["train", "val"]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue