Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
python: ["3.8", "3.10"]
python: ["3.8", "3.14"]
Comment thread
MalteEbner marked this conversation as resolved.

steps:
- name: Checkout code
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ and time-consuming. Labelformat aims to solve this pain.

- Support for common dataset label formats (more coming soon)
- Support for common tool formats (more coming soon)
- Minimal dependencies, targets python 3.8 or higher
- Minimal dependencies, supports Python 3.8 through 3.14
- Memory concious - datasets are processed file-by-file instead of loading everything
in memory (when possible)
- Typed
Expand Down Expand Up @@ -486,7 +486,7 @@ We also welcome contributions, please submit a PR.

### Development

The library targets python 3.8 and higher. We use uv to manage the development environment.
The library supports Python 3.8 through 3.14. We use uv to manage the development environment.

Here is an example development workflow:

Expand Down
4 changes: 2 additions & 2 deletions docs/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Labelformat offers a robust set of features tailored to meet the diverse needs o

- **Performance Optimizations:**
- **Memory Conscious:** Processes datasets file-by-file to minimize memory usage.
- **Minimal Dependencies:** Targets Python 3.8 or higher, ensuring broad compatibility.
- **Minimal Dependencies:** Supports Python 3.8 through 3.14, ensuring broad compatibility.

- **Cross-Platform Support:**
- **Windows, Linux, and macOS:** Works seamlessly across all major operating systems.
Expand Down Expand Up @@ -59,4 +59,4 @@ Labelformat addresses the common challenges faced when dealing with diverse labe
- **Scalability:** Handles large datasets with minimal memory footprint.
- **Flexibility:** Supports a growing list of formats and tasks, adapting to evolving project needs.

Explore our [Quick Start Guide](quick-start.md) to begin leveraging Labelformat's powerful features today!
Explore our [Quick Start Guide](quick-start.md) to begin leveraging Labelformat's powerful features today!
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## Key Features
- **Wide Format Support**: COCO, YOLO (v5-v12, v26), PascalVOC, KITTI, Labelbox, RT-DETR, RT-DETRv2, and more.
- **Cross-Platform**: Compatible with Python 3.8+ on Windows, macOS, and Linux.
- **Cross-Platform**: Compatible with Python 3.8 through 3.14 on Windows, macOS, and Linux.
- **Flexible Usage**: Intuitive CLI and Python API.
- **Efficient**: Memory-conscious, optimized for large datasets.
- **Offline First**: Operates locally without data uploads.
Expand Down Expand Up @@ -66,4 +66,4 @@
- [PyPI Package](https://pypi.org/project/labelformat/)
- [Documentation](https://labelformat.com)

Labelformat is maintained by [Lightly](https://www.lightly.ai).
Labelformat is maintained by [Lightly](https://www.lightly.ai).
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Installing **Labelformat** is straightforward. Follow the steps below to set up

## Prerequisites

- **Python 3.8 or higher:** Ensure you have Python installed on Windows, Linux, or macOS.
- **Python 3.8 through 3.14:** Ensure you have Python installed on Windows, Linux, or macOS.
- **pip:** Python's package installer. It typically comes with Python installations.

## Installation using package managers
Expand Down
16 changes: 13 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,22 @@ description = "A tool for converting computer vision label formats."
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"tqdm",
"pyyaml",
"pillow",
"pydantic==2.10.6",
"pydantic-xml==2.17.3",
"pydantic>=2.10.6",
"pydantic-xml>=2.17.3",
"numpy",
"fsspec>=2023.1.0",
]
Expand All @@ -32,7 +42,7 @@ dev = [
"black",
"isort",
"flake8",
"pytest<8",
"pytest==8",
"pytest-mock",
"build",
"twine",
Expand Down
2 changes: 1 addition & 1 deletion src/labelformat/mask_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def _trace_outer_contour(binary_mask: NDArray[np.uint8]) -> List[Tuple[float, fl
dirs = [(0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1), (-1, 0), (-1, 1)]

def is_boundary(y: int, x: int) -> bool:
return 0 <= y < h and 0 <= x < w and boundary[y, x] == 1
return bool(0 <= y < h and 0 <= x < w and boundary[y, x] == 1)

contour: List[Tuple[float, float]] = []
y, x = sy, sx
Expand Down
2 changes: 1 addition & 1 deletion src/labelformat/model/semantic_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def from_array(cls, array: NDArray[np.int_]) -> "SemanticSegmentationMask":
else:
if cur_cat_id is not None:
category_id_rle.append((cur_cat_id, cur_run_length))
cur_cat_id = cat_id
cur_cat_id = int(cat_id)
cur_run_length = 1
if cur_cat_id is not None:
category_id_rle.append((cur_cat_id, cur_run_length))
Expand Down
Loading
Loading