Skip to content

Commit 913fb32

Browse files
Merge Ultralytics Code Refactor
Automated merge of Ultralytics Code Refactor
1 parent 6d4c811 commit 913fb32

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.github/workflows/format.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ jobs:
1818
- name: Run Ultralytics Formatting
1919
uses: ultralytics/actions@main
2020
with:
21-
token: ${{ secrets.PERSONAL_ACCESS_TOKEN || secrets.GITHUB_TOKEN }} # note GITHUB_TOKEN automatically generated
21+
token: ${{ secrets._GITHUB_TOKEN }} # note GITHUB_TOKEN automatically generated
2222
labels: true # autolabel issues and PRs
2323
python: true # format Python code and docstrings
2424
prettier: true # format YAML, JSON, Markdown and CSS
2525
spelling: true # check spelling
2626
links: false # check broken links
2727
summary: true # print PR summary with GPT4o (requires 'openai_api_key')
28-
openai_azure_api_key: ${{ secrets.OPENAI_AZURE_API_KEY }}
29-
openai_azure_endpoint: ${{ secrets.OPENAI_AZURE_ENDPOINT }}
28+
openai_api_key: ${{ secrets.OPENAI_API_KEY }}

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<br>
2-
<a href="https://ultralytics.com" target="_blank"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/logo/Ultralytics_Logotype_Original.svg" width="320" alt="Ultralytics logo"></a>
2+
<a href="https://www.ultralytics.com/" target="_blank"><img src="https://raw.githubusercontent.com/ultralytics/assets/main/logo/Ultralytics_Logotype_Original.svg" width="320" alt="Ultralytics logo"></a>
33

44
# 🚀 Introduction
55

66
Welcome to the [COCO2YOLO](https://github.com/ultralytics/JSON2YOLO) repository! This toolkit is designed to help you convert datasets in JSON format, following the COCO (Common Objects in Context) standards, into YOLO (You Only Look Once) format, which is widely recognized for its efficiency in real-time object detection tasks.
77

88
This process is essential for machine learning practitioners looking to train object detection models using the Darknet framework. Our code is flexible and can be utilized across various platforms including Linux, MacOS, and Windows.
99

10-
[![Ultralytics Actions](https://github.com/ultralytics/JSON2YOLO/actions/workflows/format.yml/badge.svg)](https://github.com/ultralytics/JSON2YOLO/actions/workflows/format.yml) <a href="https://ultralytics.com/discord"><img alt="Discord" src="https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue"></a> <a href="https://community.ultralytics.com"><img alt="Ultralytics Forums" src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue"></a> <a href="https://reddit.com/r/ultralytics"><img alt="Ultralytics Reddit" src="https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue"></a>
10+
[![Ultralytics Actions](https://github.com/ultralytics/JSON2YOLO/actions/workflows/format.yml/badge.svg)](https://github.com/ultralytics/JSON2YOLO/actions/workflows/format.yml) <a href="https://discord.com/invite/ultralytics"><img alt="Discord" src="https://img.shields.io/discord/1089800235347353640?logo=discord&logoColor=white&label=Discord&color=blue"></a> <a href="https://community.ultralytics.com/"><img alt="Ultralytics Forums" src="https://img.shields.io/discourse/users?server=https%3A%2F%2Fcommunity.ultralytics.com&logo=discourse&label=Forums&color=blue"></a> <a href="https://reddit.com/r/ultralytics"><img alt="Ultralytics Reddit" src="https://img.shields.io/reddit/subreddit-subscribers/ultralytics?style=flat&logo=reddit&logoColor=white&label=Reddit&color=blue"></a>
1111

1212
# ⚙️ Requirements
1313

@@ -25,7 +25,7 @@ If you find our tool useful for your research or development, please consider ci
2525

2626
# 🤝 Contribute
2727

28-
We welcome contributions from the community! Whether you're fixing bugs, adding new features, or improving documentation, your input is invaluable. Take a look at our [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started. Also, we'd love to hear about your experience with Ultralytics products. Please consider filling out our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey). A huge 🙏 and thank you to all of our contributors!
28+
We welcome contributions from the community! Whether you're fixing bugs, adding new features, or improving documentation, your input is invaluable. Take a look at our [Contributing Guide](https://docs.ultralytics.com/help/contributing/) to get started. Also, we'd love to hear about your experience with Ultralytics products. Please consider filling out our [Survey](https://www.ultralytics.com/survey?utm_source=github&utm_medium=social&utm_campaign=Survey). A huge 🙏 and thank you to all of our contributors!
2929

3030
<!-- Ultralytics contributors -->
3131

@@ -57,5 +57,5 @@ For bug reports, feature requests, and contributions, head to [GitHub Issues](ht
5757
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
5858
<a href="https://ultralytics.com/bilibili"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-bilibili.png" width="3%" alt="Ultralytics BiliBili"></a>
5959
<img src="https://github.com/ultralytics/assets/raw/main/social/logo-transparent.png" width="3%" alt="space">
60-
<a href="https://ultralytics.com/discord"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="3%" alt="Ultralytics Discord"></a>
60+
<a href="https://discord.com/invite/ultralytics"><img src="https://github.com/ultralytics/assets/raw/main/social/logo-social-discord.png" width="3%" alt="Ultralytics Discord"></a>
6161
</div>

utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def flatten_recursive_folders(path="../../Downloads/data/sm4/"): # from utils i
153153
stem, suffix = f.stem, f.suffix
154154
if suffix.lower()[1:] in img_formats:
155155
n += 1
156-
stem_new = f"{n:g}_" + stem
156+
stem_new = f"{n:g}_{stem}"
157157
image_new = nidir / (stem_new + suffix) # converts all formats to *.jpg
158158
json_new = njdir / f"{stem_new}.json"
159159

0 commit comments

Comments
 (0)