Comments (4)
π Hello @1005183361, thank you for your interest in Ultralytics YOLOv8 π! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.
If this is a π Bug Report, please provide a minimum reproducible example to help us debug it.
If this is a custom training β Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.
Join the vibrant Ultralytics Discord π§ community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.
Install
Pip install the ultralytics
package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.
pip install ultralytics
Environments
YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
- Notebooks with free GPU:
- Google Cloud Deep Learning VM. See GCP Quickstart Guide
- Amazon Deep Learning AMI. See AWS Quickstart Guide
- Docker Image. See Docker Quickstart Guide
Status
If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.
from ultralytics.
@1005183361 hi there! π
For obtaining orientation angles from YOLOv8-obb (oriented bounding boxes) within the 0-360 degree range, you can ensure that the angle output from the model is properly normalized and adjusted. If the output doesn't directly reflect this range, you might need to convert or adjust the predictions accordingly.
In the case that your model outputs angle predictions in radians or another scale, you can convert these to degrees using a simple calculation in Python:
import numpy as np
# Example angle in radians
angle_rad = model_output_angle # This would be your model's angle output in radians
angle_deg = np.degrees(angle_rad) % 360 # Converts to degrees and normalizes to 0-360
Ensure that you apply this conversion after you receive the angle output from your model predictions. If further tweaks are necessary, it could involve modifications in the post-processing step where the model's raw output is interpreted.
I hope this helps! Let me know if you need more details. π
from ultralytics.
I used the obb model to predict the rotation of the screw locking line (the labeling method is that the positive direction of the x-axis is 0, and the clockwise direction is the increasing direction, until a circle of 360 degrees). I modified the
angle = ( in head.py angle.sigmoid()) * 2*math.pi,
it is found that it does not work. When the rotation angle exceeds 180 degrees, the model will predict incorrectly. What other codes should I modify?
from ultralytics.
Hi there! π
It sounds like you're encountering issues with angle normalization in the YOLOv8-obb model. The modification you made in head.py
is a good start, but it seems like the model might still be interpreting angles in a range that doesn't fully accommodate your 0-360 degrees requirement.
One approach could be to adjust the angle post-prediction to ensure it fits within the 0-360 range. Hereβs a quick Python snippet that might help:
import math
# Assuming 'angle' is your model's output in radians
angle_deg = (angle.sigmoid().item() * 360) % 360 # Normalize to 0-360 degrees
This modification ensures that the output angle is always within the desired range by converting the sigmoid output directly to degrees and then applying modulo 360.
If the issue persists, it might be necessary to delve deeper into how the angles are being trained and whether the loss function correctly penalizes deviations for angles near the 0/360-degree boundary.
Hope this helps! Let me know if there's anything else you'd like to explore. π
from ultralytics.
Related Issues (20)
- Inference Time Variation HOT 2
- YOLOv8-ONNXRuntime doesn't applied to yolo-obb HOT 2
- Very slow data preparation training large dataset HOT 3
- Segmentation mask is too small for large detected objects (1280,500) on image size (1280, 720) HOT 3
- [Classify] The exported model's result differs from pt's result HOT 3
- yolov8n is the latest when using pip install ultralytics? what about v9 and v10?? HOT 2
- Deprecated code, please fix. HOT 1
- How to do cross Validation with yolov8? HOT 1
- How YOLOv8-pose works? HOT 3
- Some questions about fine-tuning and training HOT 1
- Difference between hub and local performance HOT 5
- Add export and inference pipeline for Rockchip / RKNN
- Evaluate Hailo-8 M.2 Module
- Docs Integration Page - Rockchip/RKNN HOT 1
- Docs Integration Page - Hailo AI
- NotImplementedError: WARNING β οΈ 'YOLO' model does not support '_new' mode for 'None' task yet. when use yolov10 HOT 2
- how to add my posprocess to val HOT 2
- how to obtain the frame index when inferring a video HOT 2
- Evaluation indicators HOT 2
- The encoding/decoding between distance prediction and rotated box in `cxcywhr` format is not consistent in YOLOV8-OBB HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ultralytics.