Skip to content

Commit

Permalink
ultralytics 8.0.141 create new SettingsManager (ultralytics#3790)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher authored Jul 23, 2023
1 parent 42afe77 commit 20f5efd
Show file tree
Hide file tree
Showing 215 changed files with 917 additions and 749 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ repos:
hooks:
- id: codespell
args:
- --ignore-words-list=crate,nd,strack,dota
- --ignore-words-list=crate,nd,strack,dota,ane

# - repo: https://github.com/asottile/yesqa
# rev: v1.4.0
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,14 @@ We love your input! YOLOv5 and YOLOv8 would not be possible without help from ou

## <div align="center">License</div>

YOLOv8 is available under two different licenses:
Ultralytics offers two licensing options to accommodate diverse use cases:

- **AGPL-3.0 License**: See [LICENSE](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) file for details.
- **Enterprise License**: Provides greater flexibility for commercial product development without the open-source requirements of AGPL-3.0. Typical use cases are embedding Ultralytics software and AI models in commercial products and applications. Request an Enterprise License at [Ultralytics Licensing](https://ultralytics.com/license).
- **AGPL-3.0 License**: This [OSI-approved](https://opensource.org/licenses/) open-source license is ideal for students and enthusiasts, promoting open collaboration and knowledge sharing. See the [LICENSE](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) file for more details.
- **Enterprise License**: Designed for commercial use, this license permits seamless integration of Ultralytics software and AI models into commercial goods and services, bypassing the open-source requirements of AGPL-3.0. If your scenario involves embedding our solutions into a commercial offering, reach out through [Ultralytics Licensing](https://ultralytics.com/license).

## <div align="center">Contact</div>

For YOLOv8 bug reports and feature requests please visit [GitHub Issues](https://github.com/ultralytics/ultralytics/issues), and join our [Discord](https://discord.gg/2wNGbc6g9X) community for questions and discussions!
For Ultralytics bug reports and feature requests please visit [GitHub Issues](https://github.com/ultralytics/ultralytics/issues), and join our [Discord](https://discord.gg/2wNGbc6g9X) community for questions and discussions!

<br>
<div align="center">
Expand Down
8 changes: 4 additions & 4 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,14 @@ success = model.export(format="onnx") # 将模型导出为 ONNX 格式

## <div align="center">许可证</div>

YOLOv8 提供两种不同的许可证
Ultralytics 提供两种许可证选项以适应各种使用场景

- **AGPL-3.0 许可证**详细信息请参阅 [LICENSE](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) 文件
- **企业许可证**为商业产品开发提供更大的灵活性,无需遵循 AGPL-3.0 的开源要求。典型的用例是将 Ultralytics 软件和 AI 模型嵌入商业产品和应用中。在 [Ultralytics 授权](https://ultralytics.com/license) 处申请企业许可证
- **AGPL-3.0 许可证**这个[OSI 批准](https://opensource.org/licenses/)的开源许可证非常适合学生和爱好者,可以推动开放的协作和知识分享。请查看[LICENSE](https://github.com/ultralytics/ultralytics/blob/main/LICENSE) 文件以了解更多细节
- **企业许可证**专为商业用途设计,该许可证允许将 Ultralytics 的软件和 AI 模型无缝集成到商业产品和服务中,从而绕过 AGPL-3.0 的开源要求。如果您的场景涉及将我们的解决方案嵌入到商业产品中,请通过 [Ultralytics Licensing](https://ultralytics.com/license)与我们联系

## <div align="center">联系方式</div>

对于 YOLOv8 的错误报告和功能请求,请访问 [GitHub Issues](https://github.com/ultralytics/ultralytics/issues),并加入我们的 [Discord](https://discord.gg/2wNGbc6g9X) 社区进行问题和讨论!
对于 Ultralytics 的错误报告和功能请求,请访问 [GitHub Issues](https://github.com/ultralytics/ultralytics/issues),并加入我们的 [Discord](https://discord.gg/2wNGbc6g9X) 社区进行问题和讨论!

<br>
<div align="center">
Expand Down
2 changes: 1 addition & 1 deletion docs/CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
docs.ultralytics.com
docs.ultralytics.com
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,4 @@ for your repository and updating the "Custom domain" field in the "GitHub Pages"
![196814117-fc16e711-d2be-4722-9536-b7c6d78fd167](https://user-images.githubusercontent.com/26833433/210150206-9e86dcd7-10af-43e4-9eb2-9518b3799eac.png)

For more information on deploying your MkDocs documentation site, see
the [MkDocs documentation](https://www.mkdocs.org/user-guide/deploying-your-docs/).
the [MkDocs documentation](https://www.mkdocs.org/user-guide/deploying-your-docs/).
2 changes: 1 addition & 1 deletion docs/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ In addition to our Snyk scans, we also use GitHub's [CodeQL](https://docs.github

If you suspect or discover a security vulnerability in any of our repositories, please let us know immediately. You can reach out to us directly via our [contact form](https://ultralytics.com/contact) or via [[email protected]](mailto:[email protected]). Our security team will investigate and respond as soon as possible.

We appreciate your help in keeping all Ultralytics open-source projects secure and safe for everyone.
We appreciate your help in keeping all Ultralytics open-source projects secure and safe for everyone.
31 changes: 17 additions & 14 deletions docs/build_reference.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def extract_classes_and_functions(filepath):
with open(filepath, 'r') as file:
content = file.read()

class_pattern = r"(?:^|\n)class\s(\w+)(?:\(|:)"
func_pattern = r"(?:^|\n)def\s(\w+)\("
class_pattern = r'(?:^|\n)class\s(\w+)(?:\(|:)'
func_pattern = r'(?:^|\n)def\s(\w+)\('

classes = re.findall(class_pattern, content)
functions = re.findall(func_pattern, content)
Expand All @@ -34,18 +34,21 @@ def create_markdown(py_filepath, module_path, classes, functions):
md_filepath = py_filepath.with_suffix('.md')

# Read existing content and keep header content between first two ---
header_content = ""
header_content = ''
if md_filepath.exists():
with open(md_filepath, 'r') as file:
existing_content = file.read()
header_parts = existing_content.split('---', 2)
if 'description:' in header_parts or 'comments:' in header_parts and len(header_parts) >= 3:
header_content = f"{header_parts[0]}---{header_parts[1]}---\n\n"
header_parts = existing_content.split('---')
for part in header_parts:
if 'description:' in part or 'comments:' in part:
header_content += f'---{part}---\n\n'

module_path = module_path.replace('.__init__', '')
md_content = [f"## {class_name}\n---\n### ::: {module_path}.{class_name}\n<br><br>\n" for class_name in classes]
md_content.extend(f"## {func_name}\n---\n### ::: {module_path}.{func_name}\n<br><br>\n" for func_name in functions)
md_content = header_content + "\n".join(md_content)
md_content = [f'## {class_name}\n---\n### ::: {module_path}.{class_name}\n<br><br>\n' for class_name in classes]
md_content.extend(f'## {func_name}\n---\n### ::: {module_path}.{func_name}\n<br><br>\n' for func_name in functions)
md_content = header_content + '\n'.join(md_content)
if not md_content.endswith('\n'):
md_content += '\n'

os.makedirs(os.path.dirname(md_filepath), exist_ok=True)
with open(md_filepath, 'w') as file:
Expand Down Expand Up @@ -81,11 +84,11 @@ def create_nav_menu_yaml(nav_items):
nav_tree_sorted = sort_nested_dict(nav_tree)

def _dict_to_yaml(d, level=0):
yaml_str = ""
indent = " " * level
yaml_str = ''
indent = ' ' * level
for k, v in d.items():
if isinstance(v, dict):
yaml_str += f"{indent}- {k}:\n{_dict_to_yaml(v, level + 1)}"
yaml_str += f'{indent}- {k}:\n{_dict_to_yaml(v, level + 1)}'
else:
yaml_str += f"{indent}- {k}: {str(v).replace('docs/', '')}\n"
return yaml_str
Expand All @@ -99,7 +102,7 @@ def main():
nav_items = []
for root, _, files in os.walk(CODE_DIR):
for file in files:
if file.endswith(".py"):
if file.endswith('.py'):
py_filepath = Path(root) / file
classes, functions = extract_classes_and_functions(py_filepath)

Expand All @@ -113,5 +116,5 @@ def main():
create_nav_menu_yaml(nav_items)


if __name__ == "__main__":
if __name__ == '__main__':
main()
6 changes: 3 additions & 3 deletions docs/datasets/classify/caltech101.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ To train a YOLO model on the Caltech-101 dataset for 100 epochs, you can use the

```python
from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)

# Train the model
model.train(data='caltech101', epochs=100, imgsz=416)
```
Expand Down Expand Up @@ -74,4 +74,4 @@ If you use the Caltech-101 dataset in your research or development work, please
}
```

We would like to acknowledge Li Fei-Fei, Rob Fergus, and Pietro Perona for creating and maintaining the Caltech-101 dataset as a valuable resource for the machine learning and computer vision research community. For more information about the Caltech-101 dataset and its creators, visit the [Caltech-101 dataset website](https://data.caltech.edu/records/mzrjq-6wc02).
We would like to acknowledge Li Fei-Fei, Rob Fergus, and Pietro Perona for creating and maintaining the Caltech-101 dataset as a valuable resource for the machine learning and computer vision research community. For more information about the Caltech-101 dataset and its creators, visit the [Caltech-101 dataset website](https://data.caltech.edu/records/mzrjq-6wc02).
6 changes: 3 additions & 3 deletions docs/datasets/classify/caltech256.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ To train a YOLO model on the Caltech-256 dataset for 100 epochs, you can use the

```python
from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)

# Train the model
model.train(data='caltech256', epochs=100, imgsz=416)
```
Expand Down Expand Up @@ -71,4 +71,4 @@ If you use the Caltech-256 dataset in your research or development work, please

We would like to acknowledge Gregory Griffin, Alex Holub, and Pietro Perona for creating and maintaining the Caltech-256 dataset as a valuable resource for the machine learning and computer vision research community. For more information about the

Caltech-256 dataset and its creators, visit the [Caltech-256 dataset website](https://data.caltech.edu/records/nyy15-4j048).
Caltech-256 dataset and its creators, visit the [Caltech-256 dataset website](https://data.caltech.edu/records/nyy15-4j048).
6 changes: 3 additions & 3 deletions docs/datasets/classify/cifar10.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ To train a YOLO model on the CIFAR-10 dataset for 100 epochs with an image size

```python
from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)

# Train the model
model.train(data='cifar10', epochs=100, imgsz=32)
```
Expand Down Expand Up @@ -73,4 +73,4 @@ If you use the CIFAR-10 dataset in your research or development work, please cit
}
```

We would like to acknowledge Alex Krizhevsky for creating and maintaining the CIFAR-10 dataset as a valuable resource for the machine learning and computer vision research community. For more information about the CIFAR-10 dataset and its creator, visit the [CIFAR-10 dataset website](https://www.cs.toronto.edu/~kriz/cifar.html).
We would like to acknowledge Alex Krizhevsky for creating and maintaining the CIFAR-10 dataset as a valuable resource for the machine learning and computer vision research community. For more information about the CIFAR-10 dataset and its creator, visit the [CIFAR-10 dataset website](https://www.cs.toronto.edu/~kriz/cifar.html).
6 changes: 3 additions & 3 deletions docs/datasets/classify/cifar100.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ To train a YOLO model on the CIFAR-100 dataset for 100 epochs with an image size

```python
from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)

# Train the model
model.train(data='cifar100', epochs=100, imgsz=32)
```
Expand Down Expand Up @@ -73,4 +73,4 @@ If you use the CIFAR-100 dataset in your research or development work, please ci
}
```

We would like to acknowledge Alex Krizhevsky for creating and maintaining the CIFAR-100 dataset as a valuable resource for the machine learning and computer vision research community. For more information about the CIFAR-100 dataset and its creator, visit the [CIFAR-100 dataset website](https://www.cs.toronto.edu/~kriz/cifar.html).
We would like to acknowledge Alex Krizhevsky for creating and maintaining the CIFAR-100 dataset as a valuable resource for the machine learning and computer vision research community. For more information about the CIFAR-100 dataset and its creator, visit the [CIFAR-100 dataset website](https://www.cs.toronto.edu/~kriz/cifar.html).
6 changes: 3 additions & 3 deletions docs/datasets/classify/fashion-mnist.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ To train a CNN model on the Fashion-MNIST dataset for 100 epochs with an image s

```python
from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)

# Train the model
model.train(data='fashion-mnist', epochs=100, imgsz=28)
```
Expand All @@ -76,4 +76,4 @@ The example showcases the variety and complexity of the images in the Fashion-MN

## Acknowledgments

If you use the Fashion-MNIST dataset in your research or development work, please acknowledge the dataset by linking to the [GitHub repository](https://github.com/zalandoresearch/fashion-mnist). This dataset was made available by Zalando Research.
If you use the Fashion-MNIST dataset in your research or development work, please acknowledge the dataset by linking to the [GitHub repository](https://github.com/zalandoresearch/fashion-mnist). This dataset was made available by Zalando Research.
6 changes: 3 additions & 3 deletions docs/datasets/classify/imagenet.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ To train a deep learning model on the ImageNet dataset for 100 epochs with an im

```python
from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)

# Train the model
model.train(data='imagenet', epochs=100, imgsz=224)
```
Expand Down Expand Up @@ -76,4 +76,4 @@ If you use the ImageNet dataset in your research or development work, please cit
}
```

We would like to acknowledge the ImageNet team, led by Olga Russakovsky, Jia Deng, and Li Fei-Fei, for creating and maintaining the ImageNet dataset as a valuable resource for the machine learning and computer vision research community. For more information about the ImageNet dataset and its creators, visit the [ImageNet website](https://www.image-net.org/).
We would like to acknowledge the ImageNet team, led by Olga Russakovsky, Jia Deng, and Li Fei-Fei, for creating and maintaining the ImageNet dataset as a valuable resource for the machine learning and computer vision research community. For more information about the ImageNet dataset and its creators, visit the [ImageNet website](https://www.image-net.org/).
6 changes: 3 additions & 3 deletions docs/datasets/classify/imagenet10.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ To test a deep learning model on the ImageNet10 dataset with an image size of 22

```python
from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)

# Train the model
model.train(data='imagenet10', epochs=5, imgsz=224)
```
Expand Down Expand Up @@ -71,4 +71,4 @@ If you use the ImageNet10 dataset in your research or development work, please c
}
```

We would like to acknowledge the ImageNet team, led by Olga Russakovsky, Jia Deng, and Li Fei-Fei, for creating and maintaining the ImageNet dataset. The ImageNet10 dataset, while a compact subset, is a valuable resource for quick testing and debugging in the machine learning and computer vision research community. For more information about the ImageNet dataset and its creators, visit the [ImageNet website](https://www.image-net.org/).
We would like to acknowledge the ImageNet team, led by Olga Russakovsky, Jia Deng, and Li Fei-Fei, for creating and maintaining the ImageNet dataset. The ImageNet10 dataset, while a compact subset, is a valuable resource for quick testing and debugging in the machine learning and computer vision research community. For more information about the ImageNet dataset and its creators, visit the [ImageNet website](https://www.image-net.org/).
14 changes: 7 additions & 7 deletions docs/datasets/classify/imagenette.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ To train a model on the ImageNette dataset for 100 epochs with a standard image

```python
from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)

# Train the model
model.train(data='imagenette', epochs=100, imgsz=224)
```
Expand Down Expand Up @@ -70,10 +70,10 @@ To use these datasets, simply replace 'imagenette' with 'imagenette160' or 'imag

```python
from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)

# Train the model with ImageNette160
model.train(data='imagenette160', epochs=100, imgsz=160)
```
Expand All @@ -91,10 +91,10 @@ To use these datasets, simply replace 'imagenette' with 'imagenette160' or 'imag

```python
from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)

# Train the model with ImageNette320
model.train(data='imagenette320', epochs=100, imgsz=320)
```
Expand All @@ -110,4 +110,4 @@ These smaller versions of the dataset allow for rapid iterations during the deve

## Citations and Acknowledgments

If you use the ImageNette dataset in your research or development work, please acknowledge it appropriately. For more information about the ImageNette dataset, visit the [ImageNette dataset GitHub page](https://github.com/fastai/imagenette).
If you use the ImageNette dataset in your research or development work, please acknowledge it appropriately. For more information about the ImageNette dataset, visit the [ImageNette dataset GitHub page](https://github.com/fastai/imagenette).
6 changes: 3 additions & 3 deletions docs/datasets/classify/imagewoof.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ To train a CNN model on the ImageWoof dataset for 100 epochs with an image size

```python
from ultralytics import YOLO

# Load a model
model = YOLO('yolov8n-cls.pt') # load a pretrained model (recommended for training)

# Train the model
model.train(data='imagewoof', epochs=100, imgsz=224)
```
Expand Down Expand Up @@ -81,4 +81,4 @@ The example showcases the subtle differences and similarities among the differen

If you use the ImageWoof dataset in your research or development work, please make sure to acknowledge the creators of the dataset by linking to the [official dataset repository](https://github.com/fastai/imagenette). As of my knowledge cutoff in September 2021, there is no official publication specifically about ImageWoof for citation.

We would like to acknowledge the FastAI team for creating and maintaining the ImageWoof dataset as a valuable resource for the machine learning and computer vision research community. For more information about the ImageWoof dataset, visit the [ImageWoof dataset repository](https://github.com/fastai/imagenette).
We would like to acknowledge the FastAI team for creating and maintaining the ImageWoof dataset as a valuable resource for the machine learning and computer vision research community. For more information about the ImageWoof dataset, visit the [ImageWoof dataset repository](https://github.com/fastai/imagenette).
Loading

0 comments on commit 20f5efd

Please sign in to comment.