`ultralytics 8.0.90` actions and docs improvements (#2326)
Co-authored-by: calmisential <xinyu_std@163.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: triple Mu <gpu@163.com> Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com> Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com> Co-authored-by: Laughing-q <1185102784@qq.com> Co-authored-by: ran xiao <ben.xiao@me.com> Co-authored-by: rxiao <ran.xiao@silverpond.com.au>single_channel
parent
243fc4b1fe
commit
44c7c3514d
@ -0,0 +1,65 @@
|
|||||||
|
# Ultralytics Individual Contributor License Agreement
|
||||||
|
|
||||||
|
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Ultralytics
|
||||||
|
SE or its affiliates (“Ultralytics”). This Individual Contributor License Agreement (“Agreement”) sets out the terms
|
||||||
|
governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data,
|
||||||
|
materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any
|
||||||
|
manner, to Ultralytics in respect of any of the Projects (collectively “Contributions”). If you have any questions
|
||||||
|
respecting this Agreement, please contact hello@ultralytics.com.
|
||||||
|
|
||||||
|
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses
|
||||||
|
granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
|
||||||
|
|
||||||
|
**Copyright License.** You hereby grant, and agree to grant, to Ultralytics a non-exclusive, perpetual, irrevocable,
|
||||||
|
worldwide, fully-paid, royalty-free, transferable copyright license to reproduce, prepare derivative works of, publicly
|
||||||
|
display, publicly perform, and distribute your Contributions and such derivative works, with the right to sublicense the
|
||||||
|
foregoing rights through multiple tiers of sublicensees.
|
||||||
|
|
||||||
|
**Patent License.** You hereby grant, and agree to grant, to Ultralytics a non-exclusive, perpetual, irrevocable,
|
||||||
|
worldwide, fully-paid, royalty-free, transferable patent license to make, have made, use, offer to sell, sell,
|
||||||
|
import, and otherwise transfer your Contributions, where such license applies only to those patent claims
|
||||||
|
licensable by you that are necessarily infringed by your Contributions alone or by combination of your
|
||||||
|
Contributions with the Project to which such Contributions were submitted, with the right to sublicense the
|
||||||
|
foregoing rights through multiple tiers of sublicensees.
|
||||||
|
|
||||||
|
**Moral Rights.** To the fullest extent permitted under applicable law, you hereby waive, and agree not to
|
||||||
|
assert, all of your “moral rights” in or relating to your Contributions for the benefit of Ultralytics, its assigns, and
|
||||||
|
their respective direct and indirect sublicensees.
|
||||||
|
|
||||||
|
**Third Party Content/Rights.** If your Contribution includes or is based on any source code, object code, bug
|
||||||
|
fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or
|
||||||
|
other works of authorship that were not authored by you (“Third Party Content”) or if you are aware of any
|
||||||
|
third party intellectual property or proprietary rights associated with your Contribution (“Third Party Rights”),
|
||||||
|
then you agree to include with the submission of your Contribution full details respecting such Third Party
|
||||||
|
Content and Third Party Rights, including, without limitation, identification of which aspects of your
|
||||||
|
Contribution contain Third Party Content or are associated with Third Party Rights, the owner/author of the
|
||||||
|
Third Party Content and Third Party Rights, where you obtained the Third Party Content, and any applicable
|
||||||
|
third party license terms or restrictions respecting the Third Party Content and Third Party Rights. For greater
|
||||||
|
certainty, the foregoing obligations respecting the identification of Third Party Content and Third Party Rights
|
||||||
|
do not apply to any portion of a Project that is incorporated into your Contribution to that same Project.
|
||||||
|
|
||||||
|
**Representations.** You represent that, other than the Third Party Content and Third Party Rights identified by
|
||||||
|
you in accordance with this Agreement, you are the sole author of your Contributions and are legally entitled
|
||||||
|
to grant the foregoing licenses and waivers in respect of your Contributions. If your Contributions were
|
||||||
|
created in the course of your employment with your past or present employer(s), you represent that such
|
||||||
|
employer(s) has authorized you to make your Contributions on behalf of such employer(s) or such employer
|
||||||
|
(s) has waived all of their right, title or interest in or to your Contributions.
|
||||||
|
|
||||||
|
**Disclaimer.** To the fullest extent permitted under applicable law, your Contributions are provided on an "asis"
|
||||||
|
basis, without any warranties or conditions, express or implied, including, without limitation, any implied
|
||||||
|
warranties or conditions of non-infringement, merchantability or fitness for a particular purpose. You are not
|
||||||
|
required to provide support for your Contributions, except to the extent you desire to provide support.
|
||||||
|
|
||||||
|
**No Obligation.** You acknowledge that Ultralytics is under no obligation to use or incorporate your Contributions
|
||||||
|
into any of the Projects. The decision to use or incorporate your Contributions into any of the Projects will be
|
||||||
|
made at the sole discretion of Ultralytics or its authorized delegates ..
|
||||||
|
|
||||||
|
**Disputes.** This Agreement shall be governed by and construed in accordance with the laws of the State of
|
||||||
|
New York, United States of America, without giving effect to its principles or rules regarding conflicts of laws,
|
||||||
|
other than such principles directing application of New York law. The parties hereby submit to venue in, and
|
||||||
|
jurisdiction of the courts located in New York, New York for purposes relating to this Agreement. In the event
|
||||||
|
that any of the provisions of this Agreement shall be held by a court or other tribunal of competent jurisdiction
|
||||||
|
to be unenforceable, the remaining portions hereof shall remain in full force and effect.
|
||||||
|
|
||||||
|
**Assignment.** You agree that Ultralytics may assign this Agreement, and all of its rights, obligations and licenses
|
||||||
|
hereunder.
|
@ -0,0 +1,33 @@
|
|||||||
|
# Ultralytics YOLO Frequently Asked Questions (FAQ)
|
||||||
|
|
||||||
|
This FAQ section addresses some common questions and issues users might encounter while working with Ultralytics YOLO repositories.
|
||||||
|
|
||||||
|
## 1. What are the hardware requirements for running Ultralytics YOLO?
|
||||||
|
|
||||||
|
Ultralytics YOLO can be run on a variety of hardware configurations, including CPUs, GPUs, and even some edge devices. However, for optimal performance and faster training and inference, we recommend using a GPU with a minimum of 8GB of memory. NVIDIA GPUs with CUDA support are ideal for this purpose.
|
||||||
|
|
||||||
|
## 2. How do I fine-tune a pre-trained YOLO model on my custom dataset?
|
||||||
|
|
||||||
|
To fine-tune a pre-trained YOLO model on your custom dataset, you'll need to create a dataset configuration file (YAML) that defines the dataset's properties, such as the path to the images, the number of classes, and class names. Next, you'll need to modify the model configuration file to match the number of classes in your dataset. Finally, use the `train.py` script to start the training process with your custom dataset and the pre-trained model. You can find a detailed guide on fine-tuning YOLO in the Ultralytics documentation.
|
||||||
|
|
||||||
|
## 3. How do I convert a YOLO model to ONNX or TensorFlow format?
|
||||||
|
|
||||||
|
Ultralytics provides built-in support for converting YOLO models to ONNX format. You can use the `export.py` script to convert a saved model to ONNX format. If you need to convert the model to TensorFlow format, you can use the ONNX model as an intermediary and then use the ONNX-TensorFlow converter to convert the ONNX model to TensorFlow format.
|
||||||
|
|
||||||
|
## 4. Can I use Ultralytics YOLO for real-time object detection?
|
||||||
|
|
||||||
|
Yes, Ultralytics YOLO is designed to be efficient and fast, making it suitable for real-time object detection tasks. The actual performance will depend on your hardware configuration and the complexity of the model. Using a GPU and optimizing the model for your specific use case can help achieve real-time performance.
|
||||||
|
|
||||||
|
## 5. How can I improve the accuracy of my YOLO model?
|
||||||
|
|
||||||
|
Improving the accuracy of a YOLO model may involve several strategies, such as:
|
||||||
|
|
||||||
|
- Fine-tuning the model on more annotated data
|
||||||
|
- Data augmentation to increase the variety of training samples
|
||||||
|
- Using a larger or more complex model architecture
|
||||||
|
- Adjusting the learning rate, batch size, and other hyperparameters
|
||||||
|
- Using techniques like transfer learning or knowledge distillation
|
||||||
|
|
||||||
|
Remember that there's often a trade-off between accuracy and inference speed, so finding the right balance is crucial for your specific application.
|
||||||
|
|
||||||
|
If you have any more questions or need assistance, don't hesitate to consult the Ultralytics documentation or reach out to the community through GitHub Issues or the official discussion forum.
|
@ -0,0 +1,128 @@
|
|||||||
|
# Ultralytics Contributor Covenant Code of Conduct
|
||||||
|
|
||||||
|
## Our Pledge
|
||||||
|
|
||||||
|
We as members, contributors, and leaders pledge to make participation in our
|
||||||
|
community a harassment-free experience for everyone, regardless of age, body
|
||||||
|
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||||
|
identity and expression, level of experience, education, socio-economic status,
|
||||||
|
nationality, personal appearance, race, religion, or sexual identity
|
||||||
|
and orientation.
|
||||||
|
|
||||||
|
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||||
|
diverse, inclusive, and healthy community.
|
||||||
|
|
||||||
|
## Our Standards
|
||||||
|
|
||||||
|
Examples of behavior that contributes to a positive environment for our
|
||||||
|
community include:
|
||||||
|
|
||||||
|
- Demonstrating empathy and kindness toward other people
|
||||||
|
- Being respectful of differing opinions, viewpoints, and experiences
|
||||||
|
- Giving and gracefully accepting constructive feedback
|
||||||
|
- Accepting responsibility and apologizing to those affected by our mistakes,
|
||||||
|
and learning from the experience
|
||||||
|
- Focusing on what is best not just for us as individuals, but for the
|
||||||
|
overall community
|
||||||
|
|
||||||
|
Examples of unacceptable behavior include:
|
||||||
|
|
||||||
|
- The use of sexualized language or imagery, and sexual attention or
|
||||||
|
advances of any kind
|
||||||
|
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
|
- Public or private harassment
|
||||||
|
- Publishing others' private information, such as a physical or email
|
||||||
|
address, without their explicit permission
|
||||||
|
- Other conduct which could reasonably be considered inappropriate in a
|
||||||
|
professional setting
|
||||||
|
|
||||||
|
## Enforcement Responsibilities
|
||||||
|
|
||||||
|
Community leaders are responsible for clarifying and enforcing our standards of
|
||||||
|
acceptable behavior and will take appropriate and fair corrective action in
|
||||||
|
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||||
|
or harmful.
|
||||||
|
|
||||||
|
Community leaders have the right and responsibility to remove, edit, or reject
|
||||||
|
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||||
|
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||||
|
decisions when appropriate.
|
||||||
|
|
||||||
|
## Scope
|
||||||
|
|
||||||
|
This Code of Conduct applies within all community spaces, and also applies when
|
||||||
|
an individual is officially representing the community in public spaces.
|
||||||
|
Examples of representing our community include using an official e-mail address,
|
||||||
|
posting via an official social media account, or acting as an appointed
|
||||||
|
representative at an online or offline event.
|
||||||
|
|
||||||
|
## Enforcement
|
||||||
|
|
||||||
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||||
|
reported to the community leaders responsible for enforcement at
|
||||||
|
hello@ultralytics.com.
|
||||||
|
All complaints will be reviewed and investigated promptly and fairly.
|
||||||
|
|
||||||
|
All community leaders are obligated to respect the privacy and security of the
|
||||||
|
reporter of any incident.
|
||||||
|
|
||||||
|
## Enforcement Guidelines
|
||||||
|
|
||||||
|
Community leaders will follow these Community Impact Guidelines in determining
|
||||||
|
the consequences for any action they deem in violation of this Code of Conduct:
|
||||||
|
|
||||||
|
### 1. Correction
|
||||||
|
|
||||||
|
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||||
|
unprofessional or unwelcome in the community.
|
||||||
|
|
||||||
|
**Consequence**: A private, written warning from community leaders, providing
|
||||||
|
clarity around the nature of the violation and an explanation of why the
|
||||||
|
behavior was inappropriate. A public apology may be requested.
|
||||||
|
|
||||||
|
### 2. Warning
|
||||||
|
|
||||||
|
**Community Impact**: A violation through a single incident or series
|
||||||
|
of actions.
|
||||||
|
|
||||||
|
**Consequence**: A warning with consequences for continued behavior. No
|
||||||
|
interaction with the people involved, including unsolicited interaction with
|
||||||
|
those enforcing the Code of Conduct, for a specified period of time. This
|
||||||
|
includes avoiding interactions in community spaces as well as external channels
|
||||||
|
like social media. Violating these terms may lead to a temporary or
|
||||||
|
permanent ban.
|
||||||
|
|
||||||
|
### 3. Temporary Ban
|
||||||
|
|
||||||
|
**Community Impact**: A serious violation of community standards, including
|
||||||
|
sustained inappropriate behavior.
|
||||||
|
|
||||||
|
**Consequence**: A temporary ban from any sort of interaction or public
|
||||||
|
communication with the community for a specified period of time. No public or
|
||||||
|
private interaction with the people involved, including unsolicited interaction
|
||||||
|
with those enforcing the Code of Conduct, is allowed during this period.
|
||||||
|
Violating these terms may lead to a permanent ban.
|
||||||
|
|
||||||
|
### 4. Permanent Ban
|
||||||
|
|
||||||
|
**Community Impact**: Demonstrating a pattern of violation of community
|
||||||
|
standards, including sustained inappropriate behavior, harassment of an
|
||||||
|
individual, or aggression toward or disparagement of classes of individuals.
|
||||||
|
|
||||||
|
**Consequence**: A permanent ban from any sort of public interaction within
|
||||||
|
the community.
|
||||||
|
|
||||||
|
## Attribution
|
||||||
|
|
||||||
|
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||||
|
version 2.0, available at
|
||||||
|
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||||
|
|
||||||
|
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||||
|
enforcement ladder](https://github.com/mozilla/diversity).
|
||||||
|
|
||||||
|
For answers to common questions about this code of conduct, see the FAQ at
|
||||||
|
https://www.contributor-covenant.org/faq. Translations are available at
|
||||||
|
https://www.contributor-covenant.org/translations.
|
||||||
|
|
||||||
|
[homepage]: https://www.contributor-covenant.org
|
@ -0,0 +1,69 @@
|
|||||||
|
# Contributing to Ultralytics Open-Source YOLO Repositories
|
||||||
|
|
||||||
|
First of all, thank you for your interest in contributing to Ultralytics open-source YOLO repositories! Your contributions will help improve the project and benefit the community. This document provides guidelines and best practices for contributing to Ultralytics YOLO repositories.
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
- [Code of Conduct](#code-of-conduct)
|
||||||
|
- [Pull Requests](#pull-requests)
|
||||||
|
- [CLA Signing](#cla-signing)
|
||||||
|
- [Google-Style Docstrings](#google-style-docstrings)
|
||||||
|
- [GitHub Actions CI Tests](#github-actions-ci-tests)
|
||||||
|
- [Bug Reports](#bug-reports)
|
||||||
|
- [Minimum Reproducible Example](#minimum-reproducible-example)
|
||||||
|
- [License and Copyright](#license-and-copyright)
|
||||||
|
|
||||||
|
## Code of Conduct
|
||||||
|
|
||||||
|
All contributors are expected to adhere to the [Code of Conduct](code_of_conduct.md) to ensure a welcoming and inclusive environment for everyone.
|
||||||
|
|
||||||
|
## Pull Requests
|
||||||
|
|
||||||
|
We welcome contributions in the form of pull requests. To make the review process smoother, please follow these guidelines:
|
||||||
|
|
||||||
|
1. **Fork the repository**: Fork the Ultralytics YOLO repository to your own GitHub account.
|
||||||
|
|
||||||
|
2. **Create a branch**: Create a new branch in your forked repository with a descriptive name for your changes.
|
||||||
|
|
||||||
|
3. **Make your changes**: Make the changes you want to contribute. Ensure that your changes follow the coding style of the project and do not introduce new errors or warnings.
|
||||||
|
|
||||||
|
4. **Test your changes**: Test your changes locally to ensure that they work as expected and do not introduce new issues.
|
||||||
|
|
||||||
|
5. **Commit your changes**: Commit your changes with a descriptive commit message. Make sure to include any relevant issue numbers in your commit message.
|
||||||
|
|
||||||
|
6. **Create a pull request**: Create a pull request from your forked repository to the main Ultralytics YOLO repository. In the pull request description, provide a clear explanation of your changes and how they improve the project.
|
||||||
|
|
||||||
|
### CLA Signing
|
||||||
|
|
||||||
|
Before we can accept your pull request, you need to sign a [Contributor License Agreement (CLA)](CLA.md). This is a legal document stating that you agree to the terms of contributing to the Ultralytics YOLO repositories. The CLA ensures that your contributions are properly licensed and that the project can continue to be distributed under the AGPL-3.0 license.
|
||||||
|
|
||||||
|
To sign the CLA, follow the instructions provided by the CLA bot after you submit your PR.
|
||||||
|
|
||||||
|
### Google-Style Docstrings
|
||||||
|
|
||||||
|
When adding new functions or classes, please include a [Google-style docstring](https://google.github.io/styleguide/pyguide.html) to provide clear and concise documentation for other developers. This will help ensure that your contributions are easy to understand and maintain.
|
||||||
|
|
||||||
|
Example Google-style docstring:
|
||||||
|
|
||||||
|
```python
|
||||||
|
def example_function(arg1: int, arg2: str) -> bool:
|
||||||
|
"""Example function that demonstrates Google-style docstrings.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
arg1 (int): The first argument.
|
||||||
|
arg2 (str): The second argument.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
bool: True if successful, False otherwise.
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
ValueError: If `arg1` is negative or `arg2` is empty.
|
||||||
|
"""
|
||||||
|
if arg1 < 0 or not arg2:
|
||||||
|
raise ValueError("Invalid input values")
|
||||||
|
return True
|
||||||
|
```
|
||||||
|
|
||||||
|
### GitHub Actions CI Tests
|
||||||
|
|
||||||
|
Before your pull request can be merged, all GitHub Actions Continuous Integration (CI) tests must pass. These tests include linting, unit tests, and other checks to ensure that your changes meet the quality standards of the project. Make sure to review the output of the GitHub Actions and fix any issues
|
@ -0,0 +1,10 @@
|
|||||||
|
Welcome to the Ultralytics Help page! We are committed to providing you with comprehensive resources to make your experience with Ultralytics YOLO repositories as smooth and enjoyable as possible. On this page, you'll find essential links to guides and documents that will help you navigate through common tasks and address any questions you might have while using our repositories.
|
||||||
|
|
||||||
|
- [Frequently Asked Questions (FAQ)](FAQ.md): Find answers to common questions and issues faced by users and contributors of Ultralytics YOLO repositories.
|
||||||
|
- [Contributing Guide](contributing.md): Learn the best practices for submitting pull requests, reporting bugs, and contributing to the development of our repositories.
|
||||||
|
- [Contributor License Agreement (CLA)](CLA.md): Familiarize yourself with our CLA to understand the terms and conditions for contributing to Ultralytics projects.
|
||||||
|
- [Minimum Reproducible Example (MRE) Guide](minimum_reproducible_example.md): Understand how to create an MRE when submitting bug reports to ensure that our team can quickly and efficiently address the issue.
|
||||||
|
- [Code of Conduct](code_of_conduct.md): Learn about our community guidelines and expectations to ensure a welcoming and inclusive environment for all participants.
|
||||||
|
- [Security Policy](../SECURITY.md): Understand our security practices and how to report security vulnerabilities responsibly.
|
||||||
|
|
||||||
|
We highly recommend going through these guides to make the most of your collaboration with the Ultralytics community. Our goal is to maintain a welcoming and supportive environment for all users and contributors. If you need further assistance, don't hesitate to reach out to us through GitHub Issues or the official discussion forum. Happy coding!
|
@ -0,0 +1,72 @@
|
|||||||
|
# Creating a Minimum Reproducible Example for Bug Reports in Ultralytics YOLO Repositories
|
||||||
|
|
||||||
|
When submitting a bug report for Ultralytics YOLO repositories, it's essential to provide a [minimum reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) (MRE). An MRE is a small, self-contained piece of code that demonstrates the problem you're experiencing. Providing an MRE helps maintainers and contributors understand the issue and work on a fix more efficiently. This guide explains how to create an MRE when submitting bug reports to Ultralytics YOLO repositories.
|
||||||
|
|
||||||
|
## 1. Isolate the Problem
|
||||||
|
|
||||||
|
The first step in creating an MRE is to isolate the problem. This means removing any unnecessary code or dependencies that are not directly related to the issue. Focus on the specific part of the code that is causing the problem and remove any irrelevant code.
|
||||||
|
|
||||||
|
## 2. Use Public Models and Datasets
|
||||||
|
|
||||||
|
When creating an MRE, use publicly available models and datasets to reproduce the issue. For example, use the 'yolov8n.pt' model and the 'coco8.yaml' dataset. This ensures that the maintainers and contributors can easily run your example and investigate the problem without needing access to proprietary data or custom models.
|
||||||
|
|
||||||
|
## 3. Include All Necessary Dependencies
|
||||||
|
|
||||||
|
Make sure to include all the necessary dependencies in your MRE. If your code relies on external libraries, specify the required packages and their versions. Ideally, provide a `requirements.txt` file or list the dependencies in your bug report.
|
||||||
|
|
||||||
|
## 4. Write a Clear Description of the Issue
|
||||||
|
|
||||||
|
Provide a clear and concise description of the issue you're experiencing. Explain the expected behavior and the actual behavior you're encountering. If applicable, include any relevant error messages or logs.
|
||||||
|
|
||||||
|
## 5. Format Your Code Properly
|
||||||
|
|
||||||
|
When submitting an MRE, format your code properly using code blocks in the issue description. This makes it easier for others to read and understand your code. In GitHub, you can create a code block by wrapping your code with triple backticks (\```) and specifying the language:
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
```python
|
||||||
|
# Your Python code goes here
|
||||||
|
```
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
## 6. Test Your MRE
|
||||||
|
|
||||||
|
Before submitting your MRE, test it to ensure that it accurately reproduces the issue. Make sure that others can run your example without any issues or modifications.
|
||||||
|
|
||||||
|
## Example of an MRE
|
||||||
|
|
||||||
|
Here's an example of an MRE for a hypothetical bug report:
|
||||||
|
|
||||||
|
**Bug description:**
|
||||||
|
|
||||||
|
When running the `detect.py` script on the sample image from the 'coco8.yaml' dataset, I get an error related to the dimensions of the input tensor.
|
||||||
|
|
||||||
|
**MRE:**
|
||||||
|
|
||||||
|
```python
|
||||||
|
import torch
|
||||||
|
from ultralytics import YOLO
|
||||||
|
|
||||||
|
# Load the model
|
||||||
|
model = YOLO("yolov8n.pt")
|
||||||
|
|
||||||
|
# Load a 0-channel image
|
||||||
|
image = torch.rand(1, 0, 640, 640)
|
||||||
|
|
||||||
|
# Run the model
|
||||||
|
results = model(image)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Error message:**
|
||||||
|
|
||||||
|
```
|
||||||
|
RuntimeError: Expected input[1, 0, 640, 640] to have 3 channels, but got 0 channels instead
|
||||||
|
```
|
||||||
|
|
||||||
|
**Dependencies:**
|
||||||
|
|
||||||
|
- torch==2.0.0
|
||||||
|
- ultralytics==8.0.90
|
||||||
|
|
||||||
|
In this example, the MRE demonstrates the issue with a minimal amount of code, uses a public model ('yolov8n.pt'), includes all necessary dependencies, and provides a clear description of the problem along with the error message.
|
||||||
|
|
||||||
|
By following these guidelines, you'll help the maintainers and contributors of Ultralytics YOLO repositories to understand and resolve your issue more efficiently.
|
@ -0,0 +1,155 @@
|
|||||||
|
Ultralytics supports many models and architectures with more to come in the future. What to add your model architecture? [Here's](../help/contributing.md) how you can contribute
|
||||||
|
|
||||||
|
|
||||||
|
## YOLO
|
||||||
|
Model *.yaml files may be used directly in the Command Line Interface (CLI) with a yolo command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yolo task=detect mode=train model=yolov8n.yaml data=coco128.yaml epochs=100
|
||||||
|
```
|
||||||
|
|
||||||
|
They may also be used directly in a Python environment, and accepts the same arguments as in the CLI example above:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from ultralytics import YOLO
|
||||||
|
|
||||||
|
model = YOLO("model.yaml") # build a YOLOv8n model from scratch
|
||||||
|
# YOLO("model.pt") use pre-trained model if available
|
||||||
|
model.info() # display model information
|
||||||
|
model.train(data="coco128.yaml", epochs=100) # train the model
|
||||||
|
```
|
||||||
|
|
||||||
|
## YOLOv8
|
||||||
|
|
||||||
|
### About
|
||||||
|
|
||||||
|
|
||||||
|
### Supported Tasks
|
||||||
|
|
||||||
|
| Model Type | Pre-trained Weights | Task |
|
||||||
|
|-------------|------------------------------------------------------------------------------------------------------------------|-----------------------|
|
||||||
|
| YOLOv8 | `yolov8n.pt`, `yolov8s.pt`, `yolov8m.pt`, `yolov8l.pt`, `yolov8x.pt` | Detection |
|
||||||
|
| YOLOv8-seg | `yolov8n-seg.pt`, `yolov8s-seg.pt`, `yolov8m-seg.pt`, `yolov8l-seg.pt`, `yolov8x-seg.pt` | Instance Segmentation |
|
||||||
|
| YOLOv8-pose | `yolov8n-pose.pt`, `yolov8s-pose.pt`, `yolov8m-pose.pt`, `yolov8l-pose.pt`, `yolov8x-pose.pt` ,`yolov8x-pose-p6` | Pose/Keypoints |
|
||||||
|
| YOLOv8-cls | `yolov8n-cls.pt`, `yolov8s-cls.pt`, `yolov8m-cls.pt`, `yolov8l-cls.pt`, `yolov8x-cls.pt` | Classification |
|
||||||
|
|
||||||
|
### Supported Modes
|
||||||
|
| Mode | Supported |
|
||||||
|
|------------|--------------------|
|
||||||
|
| Inference | :heavy_check_mark: |
|
||||||
|
| Validation | :heavy_check_mark: |
|
||||||
|
| Training | :heavy_check_mark: |
|
||||||
|
|
||||||
|
??? Performance
|
||||||
|
|
||||||
|
=== "Detection"
|
||||||
|
|
||||||
|
| Model | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) |
|
||||||
|
| ------------------------------------------------------------------------------------ | --------------------- | -------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- |
|
||||||
|
| [YOLOv8n](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt) | 640 | 37.3 | 80.4 | 0.99 | 3.2 | 8.7 |
|
||||||
|
| [YOLOv8s](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s.pt) | 640 | 44.9 | 128.4 | 1.20 | 11.2 | 28.6 |
|
||||||
|
| [YOLOv8m](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m.pt) | 640 | 50.2 | 234.7 | 1.83 | 25.9 | 78.9 |
|
||||||
|
| [YOLOv8l](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l.pt) | 640 | 52.9 | 375.2 | 2.39 | 43.7 | 165.2 |
|
||||||
|
| [YOLOv8x](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x.pt) | 640 | 53.9 | 479.1 | 3.53 | 68.2 | 257.8 |
|
||||||
|
|
||||||
|
=== "Segmentation"
|
||||||
|
|
||||||
|
| Model | size<br><sup>(pixels) | mAP<sup>box<br>50-95 | mAP<sup>mask<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) |
|
||||||
|
| -------------------------------------------------------------------------------------------- | --------------------- | -------------------- | --------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- |
|
||||||
|
| [YOLOv8n-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-seg.pt) | 640 | 36.7 | 30.5 | 96.1 | 1.21 | 3.4 | 12.6 |
|
||||||
|
| [YOLOv8s-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s-seg.pt) | 640 | 44.6 | 36.8 | 155.7 | 1.47 | 11.8 | 42.6 |
|
||||||
|
| [YOLOv8m-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m-seg.pt) | 640 | 49.9 | 40.8 | 317.0 | 2.18 | 27.3 | 110.2 |
|
||||||
|
| [YOLOv8l-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l-seg.pt) | 640 | 52.3 | 42.6 | 572.4 | 2.79 | 46.0 | 220.5 |
|
||||||
|
| [YOLOv8x-seg](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x-seg.pt) | 640 | 53.4 | 43.4 | 712.1 | 4.02 | 71.8 | 344.1 |
|
||||||
|
|
||||||
|
=== "Classification"
|
||||||
|
|
||||||
|
| Model | size<br><sup>(pixels) | acc<br><sup>top1 | acc<br><sup>top5 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) at 640 |
|
||||||
|
| -------------------------------------------------------------------------------------------- | --------------------- | ---------------- | ---------------- | ------------------------------ | ----------------------------------- | ------------------ | ------------------------ |
|
||||||
|
| [YOLOv8n-cls](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-cls.pt) | 224 | 66.6 | 87.0 | 12.9 | 0.31 | 2.7 | 4.3 |
|
||||||
|
| [YOLOv8s-cls](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s-cls.pt) | 224 | 72.3 | 91.1 | 23.4 | 0.35 | 6.4 | 13.5 |
|
||||||
|
| [YOLOv8m-cls](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m-cls.pt) | 224 | 76.4 | 93.2 | 85.4 | 0.62 | 17.0 | 42.7 |
|
||||||
|
| [YOLOv8l-cls](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l-cls.pt) | 224 | 78.0 | 94.1 | 163.0 | 0.87 | 37.5 | 99.7 |
|
||||||
|
| [YOLOv8x-cls](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x-cls.pt) | 224 | 78.4 | 94.3 | 232.0 | 1.01 | 57.4 | 154.8 |
|
||||||
|
|
||||||
|
=== "Pose"
|
||||||
|
|
||||||
|
| Model | size<br><sup>(pixels) | mAP<sup>pose<br>50-95 | mAP<sup>pose<br>50 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) |
|
||||||
|
| ---------------------------------------------------------------------------------------------------- | --------------------- | --------------------- | ------------------ | ------------------------------ | ----------------------------------- | ------------------ | ----------------- |
|
||||||
|
| [YOLOv8n-pose](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-pose.pt) | 640 | 50.4 | 80.1 | 131.8 | 1.18 | 3.3 | 9.2 |
|
||||||
|
| [YOLOv8s-pose](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8s-pose.pt) | 640 | 60.0 | 86.2 | 233.2 | 1.42 | 11.6 | 30.2 |
|
||||||
|
| [YOLOv8m-pose](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8m-pose.pt) | 640 | 65.0 | 88.8 | 456.3 | 2.00 | 26.4 | 81.0 |
|
||||||
|
| [YOLOv8l-pose](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8l-pose.pt) | 640 | 67.6 | 90.0 | 784.5 | 2.59 | 44.4 | 168.6 |
|
||||||
|
| [YOLOv8x-pose](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x-pose.pt) | 640 | 69.2 | 90.2 | 1607.1 | 3.73 | 69.4 | 263.2 |
|
||||||
|
| [YOLOv8x-pose-p6](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8x-pose-p6.pt) | 1280 | 71.6 | 91.2 | 4088.7 | 10.04 | 99.1 | 1066.4 |
|
||||||
|
|
||||||
|
|
||||||
|
## YOLOv5u
|
||||||
|
|
||||||
|
### About
|
||||||
|
Anchor-free YOLOv5 models with improved accuracy-speed tradeoff.
|
||||||
|
|
||||||
|
### Supported Tasks
|
||||||
|
|
||||||
|
| Model Type | Pre-trained Weights | Task |
|
||||||
|
|------------|-----------------------------------------------------------------------------------------------------------------------------|-----------|
|
||||||
|
| YOLOv5u | `yolov5nu`, `yolov5su`, `yolov5mu`, `yolov5lu`, `yolov5xu`, `yolov5n6u`, `yolov5s6u`, `yolov5m6u`, `yolov5l6u`, `yolov5x6u` | Detection |
|
||||||
|
|
||||||
|
### Supported Modes
|
||||||
|
| Mode | Supported |
|
||||||
|
|------------|--------------------|
|
||||||
|
| Inference | :heavy_check_mark: |
|
||||||
|
| Validation | :heavy_check_mark: |
|
||||||
|
| Training | :heavy_check_mark: |
|
||||||
|
|
||||||
|
|
||||||
|
??? Performance
|
||||||
|
|
||||||
|
|
||||||
|
=== "Detection"
|
||||||
|
|
||||||
|
| Model | size<br><sup>(pixels) | mAP<sup>val<br>50-95 | Speed<br><sup>CPU ONNX<br>(ms) | Speed<br><sup>A100 TensorRT<br>(ms) | params<br><sup>(M) | FLOPs<br><sup>(B) |
|
||||||
|
| ---------------------------------------------------------------------------------------- | --------------------- | -------------------- | ------------------------------ | ----------------------------------- | ------------------ | ----------------- |
|
||||||
|
| [YOLOv5nu](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov5nu.pt) | 640 | 34.3 | 73.6 | 1.06 | 2.6 | 7.7 |
|
||||||
|
| [YOLOv5su](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov5su.pt) | 640 | 43.0 | 120.7 | 1.27 | 9.1 | 24.0 |
|
||||||
|
| [YOLOv5mu](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov5mu.pt) | 640 | 49.0 | 233.9 | 1.86 | 25.1 | 64.2 |
|
||||||
|
| [YOLOv5lu](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov5lu.pt) | 640 | 52.2 | 408.4 | 2.50 | 53.2 | 135.0 |
|
||||||
|
| [YOLOv5xu](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov5xu.pt) | 640 | 53.2 | 763.2 | 3.81 | 97.2 | 246.4 |
|
||||||
|
| | | | | | | |
|
||||||
|
| [YOLOv5n6u](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov5n6u.pt) | 1280 | 42.1 | - | - | 4.3 | 7.8 |
|
||||||
|
| [YOLOv5s6u](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov5s6u.pt) | 1280 | 48.6 | - | - | 15.3 | 24.6 |
|
||||||
|
| [YOLOv5m6u](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov5m6u.pt) | 1280 | 53.6 | - | - | 41.2 | 65.7 |
|
||||||
|
| [YOLOv5l6u](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov5l6u.pt) | 1280 | 55.7 | - | - | 86.1 | 137.4 |
|
||||||
|
| [YOLOv5x6u](https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov5x6u.pt) | 1280 | 56.8 | - | - | 155.4 | 250.7 |
|
||||||
|
|
||||||
|
---
|
||||||
|
## Vision Transformers
|
||||||
|
Vit models currently support Python environment:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from ultralytics.vit import SAM
|
||||||
|
# from ultralytics.vit import MODEL_TYPe
|
||||||
|
|
||||||
|
model = SAM("sam_b.pt")
|
||||||
|
model.info() # display model information
|
||||||
|
model.predict(...) # train the model
|
||||||
|
```
|
||||||
|
|
||||||
|
## Segment Anything
|
||||||
|
|
||||||
|
### About
|
||||||
|
|
||||||
|
|
||||||
|
### Supported Tasks
|
||||||
|
|
||||||
|
| Model Type | Pre-trained Weights | Tasks Supported |
|
||||||
|
|------------|---------------------|-----------------------|
|
||||||
|
| sam base | `sam_b.pt` | Instance Segmentation |
|
||||||
|
| sam large | `sam_l.pt` | Instance Segmentation |
|
||||||
|
|
||||||
|
### Supported Modes
|
||||||
|
| Mode | Supported |
|
||||||
|
|------------|--------------------|
|
||||||
|
| Inference | :heavy_check_mark: |
|
||||||
|
| Validation | :x: |
|
||||||
|
| Training | :x: |
|
@ -0,0 +1,4 @@
|
|||||||
|
# auto_annotate
|
||||||
|
---
|
||||||
|
:::ultralytics.yolo.data.annotator.auto_annotate
|
||||||
|
<br><br>
|
@ -0,0 +1,39 @@
|
|||||||
|
# _log_scalars
|
||||||
|
---
|
||||||
|
:::ultralytics.yolo.utils.callbacks.neptune._log_scalars
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
# _log_images
|
||||||
|
---
|
||||||
|
:::ultralytics.yolo.utils.callbacks.neptune._log_images
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
# _log_plot
|
||||||
|
---
|
||||||
|
:::ultralytics.yolo.utils.callbacks.neptune._log_plot
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
# on_pretrain_routine_start
|
||||||
|
---
|
||||||
|
:::ultralytics.yolo.utils.callbacks.neptune.on_pretrain_routine_start
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
# on_train_epoch_end
|
||||||
|
---
|
||||||
|
:::ultralytics.yolo.utils.callbacks.neptune.on_train_epoch_end
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
# on_fit_epoch_end
|
||||||
|
---
|
||||||
|
:::ultralytics.yolo.utils.callbacks.neptune.on_fit_epoch_end
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
# on_val_end
|
||||||
|
---
|
||||||
|
:::ultralytics.yolo.utils.callbacks.neptune.on_val_end
|
||||||
|
<br><br>
|
||||||
|
|
||||||
|
# on_train_end
|
||||||
|
---
|
||||||
|
:::ultralytics.yolo.utils.callbacks.neptune.on_train_end
|
||||||
|
<br><br>
|
Loading…
Reference in new issue