[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Yolo-OBB (Oriented Bounding Boxes) format #1227

Merged
merged 23 commits into from
Jun 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2653f5a
Adding support for Yolo-OBB format
Bhavay-2001 May 24, 2024
51c7ebd
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] May 24, 2024
7e4fc8a
Made few changes to add OBB support
Bhavay-2001 Jun 5, 2024
d025791
Merge branch 'OBB' of https://github.com/Bhavay-2001/roboflow-supervi…
Bhavay-2001 Jun 5, 2024
46bd267
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jun 5, 2024
523d218
Made few changes to add OBB support
Bhavay-2001 Jun 5, 2024
29161a4
Merge branch 'OBB' of https://github.com/Bhavay-2001/roboflow-supervi…
Bhavay-2001 Jun 5, 2024
fc2710c
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jun 5, 2024
a82c37c
Updated yolo.py for OBB support
Bhavay-2001 Jun 5, 2024
2f644c5
Merge branch 'OBB' of https://github.com/Bhavay-2001/roboflow-supervi…
Bhavay-2001 Jun 5, 2024
859f025
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jun 5, 2024
6ca09cc
Added default value for is_obb parameter
Bhavay-2001 Jun 6, 2024
1ea9345
Merge branch 'OBB' of https://github.com/Bhavay-2001/roboflow-supervi…
Bhavay-2001 Jun 6, 2024
4205435
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jun 6, 2024
47f1c44
Updated criteria for xyxyxyxy
Bhavay-2001 Jun 6, 2024
3e2fe83
Merge branch 'OBB' of https://github.com/Bhavay-2001/roboflow-supervi…
Bhavay-2001 Jun 6, 2024
cce69d8
fix(pre_commit): 🎨 auto format pre-commit hooks
pre-commit-ci[bot] Jun 6, 2024
6f7f728
Changed the position of a line
Bhavay-2001 Jun 13, 2024
d5f8b94
Merge branch 'OBB' of https://github.com/Bhavay-2001/roboflow-supervi…
Bhavay-2001 Jun 13, 2024
79ea168
Merge branch 'develop' into OBB
LinasKo Jun 18, 2024
dcfb122
Fix xyxyxyxy shape
LinasKo Jun 18, 2024
257e73f
Change uncommon np.int0 type to its alias np.intp
LinasKo Jun 18, 2024
a81f24e
Explain OBB format in docstring
LinasKo Jun 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(pre_commit): 🎨 auto format pre-commit hooks
  • Loading branch information
pre-commit-ci[bot] committed Jun 6, 2024
commit cce69d893ed18e605bcac107ac82a7fccd23699f
6 changes: 4 additions & 2 deletions supervision/dataset/formats/yolo.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ def yolo_annotations_to_detections(
class_id = np.array(class_id, dtype=int)
relative_xyxy = np.array(relative_xyxy, dtype=np.float32)
xyxy = relative_xyxy * np.array([w, h, w, h], dtype=np.float32)

if is_obb:
relative_xyxyxyxy = np.array(relative_xyxyxyxy, dtype=np.float32)
xyxyxyxy = relative_xyxyxyxy * np.array([w, h, w, h, w, h, w, h], dtype=np.float32)
xyxyxyxy = relative_xyxyxyxy * np.array(
[w, h, w, h, w, h, w, h], dtype=np.float32
)
data = {ORIENTED_BOX_COORDINATES: xyxyxyxy}

if not with_masks:
Expand Down