Compare commits

..

No commits in common. "main" and "v0.1.6" have entirely different histories.
main ... v0.1.6

5 changed files with 6 additions and 47 deletions

View File

@ -1,39 +0,0 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package
on:
release:
types: [published]
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

View File

@ -2,7 +2,6 @@
[![PyPI - Version](https://img.shields.io/pypi/v/labelme2yolo.svg)](https://pypi.org/project/labelme2yolo)
![PyPI - Downloads](https://img.shields.io/pypi/dm/labelme2yolo?style=flat)
[![PYPI - Downloads](https://static.pepy.tech/badge/labelme2yolo)](https://pepy.tech/project/labelme2yolo)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/labelme2yolo.svg)](https://pypi.org/project/labelme2yolo)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/12122fe86f8643c4aa5667c20d528f61)](https://www.codacy.com/gh/GreatV/labelme2yolo/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=GreatV/labelme2yolo\&utm_campaign=Badge_Grade)

View File

@ -24,7 +24,7 @@ classifiers = [
]
dependencies = [
"opencv-python>=4.1.2",
"Pillow>=9.2,<10.4",
"Pillow>=9.2,<10.3",
"numpy>=1.23.1,<1.27.0",
"rich"
]

View File

@ -4,4 +4,4 @@
"""
about version
"""
__version__ = "0.1.7"
__version__ = "0.1.6"

View File

@ -137,14 +137,14 @@ def save_yolo_image(json_data, json_dir, image_dir, target_dir, target_name):
"""Save yolo image to image_dir_path/target_dir"""
img_path = os.path.join(image_dir, target_dir, target_name)
if json_data["imageData"]:
img = img_b64_to_arr(json_data["imageData"])
PIL.Image.fromarray(img).save(img_path)
else:
if json_data["imageData"] is None:
image_name = json_data["imagePath"]
src_image_name = os.path.join(json_dir, image_name)
src_image = cv2.imread(src_image_name)
cv2.imwrite(img_path, src_image)
else:
img = img_b64_to_arr(json_data["imageData"])
PIL.Image.fromarray(img).save(img_path)
return img_path
@ -166,7 +166,6 @@ class Labelme2YOLO:
label: label_id for label_id, label in enumerate(label_list)
}
else:
logger.info("Searching label list from json files ...")
# get label list from json files for parallel processing
json_files = glob.glob(
os.path.join(self._json_dir, "**", "*.json"), recursive=True