Skip to content

Commit d2f596f

Browse files
authored
Docs cleanup and analytics (#24)
* Only show analytics when on prod * Update docs * Add content tabs. Add analytics.
1 parent 81030bc commit d2f596f

File tree

8 files changed

+110
-51
lines changed

8 files changed

+110
-51
lines changed

docs/about-us.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ At Lightly, we aim to simplify the complexities of active learning and data mana
2323

2424
Stay updated with the latest developments, tips, and tutorials by following us:
2525

26-
- [GitHub](https://github.com/lightly-ai/labelformat)
27-
- [Twitter](https://twitter.com/lightly_ai)
28-
- [LinkedIn](https://www.linkedin.com/company/lightly-ai)
26+
- [GitHub](https://github.com/lightly-ai)
27+
- [Twitter](https://x.com/LightlyAI)
2928

3029
---
3130

docs/assets/js/analytics.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
if (window.location.hostname !== 'labelformat.com') {
2+
console.log("Google Analytics disabled on localhost or non-production environments");
3+
window['ga-disable-G-K4PH64C9BM'] = true;
4+
}

docs/features.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,20 @@ Labelformat offers a robust set of features tailored to meet the diverse needs o
55
## Key Features
66

77
- **Wide Format Support:**
8-
- **Object Detection**
9-
- **Instance Segmentation**
8+
- **2D Object Detection:** Bounding box annotations for object localization
9+
- **Instance Segmentation:** Pixel-level masks for precise object delineation
1010

1111
- **User-Friendly CLI and Python API:**
12-
- **CLI:** Simple commands to convert formats with customizable options.
12+
- **CLI:** Simple terminal commands to convert formats with customizable options.
1313
- **Python API:** Integrate label conversion seamlessly into your Python workflows.
1414

1515
- **Performance Optimizations:**
1616
- **Memory Conscious:** Processes datasets file-by-file to minimize memory usage.
1717
- **Minimal Dependencies:** Targets Python 3.7 or higher, ensuring broad compatibility.
1818

19+
- **Cross-Platform Support:**
20+
- **Windows, Linux, and macOS:** Works seamlessly across all major operating systems.
21+
1922
- **Reliability and Testing:**
2023
- **Typed Codebase:** Ensures type safety and easier maintenance.
2124
- **Round-Trip Tests:** Guarantees label consistency across conversions.
@@ -52,4 +55,4 @@ Labelformat addresses the common challenges faced when dealing with diverse labe
5255
- **Scalability:** Handles large datasets with minimal memory footprint.
5356
- **Flexibility:** Supports a growing list of formats and tasks, adapting to evolving project needs.
5457

55-
Explore our [Quick Start Guide](quick_start.md) to begin leveraging Labelformat's powerful features today!
58+
Explore our [Quick Start Guide](quick-start.md) to begin leveraging Labelformat's powerful features today!

docs/index.md

+49-14
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,67 @@
11

22
![Labelformat Banner](assets/labelformat_banner.png)
33

4-
# Labelformat - Label Conversion, Simplified
4+
# Labelformat - Fast Label Conversion for Computer Vision
55

6+
**Labelformat** is an open-source Python framework for converting between popular computer vision annotation formats like YOLO, COCO, PascalVOC, and KITTI. Save hours on tedious format conversions and ensure consistency in your workflows.
67

7-
Welcome to **Labelformat**—an open-source tool designed to effortlessly convert between various popular computer vision label formats. Whether you're adapting labels from downloaded datasets or modifying outputs from labeling tools to suit your model's requirements, Labelformat streamlines the process, saving you time and reducing complexity.
88

9-
## Why Choose Labelformat?
9+
## Key Features
10+
- **Wide Format Support**: COCO, YOLO (v5-v11), PascalVOC, KITTI, Labelbox, and more.
11+
- **Cross-Platform**: Compatible with Python 3.7+ on Windows, macOS, and Linux.
12+
- **Flexible Usage**: Intuitive CLI and Python API.
13+
- **Efficient**: Memory-conscious, optimized for large datasets.
14+
- **Offline First**: Operates locally without data uploads.
15+
- **Tested for Accuracy**: Round-trip tests for consistent results.
1016

11-
- **Comprehensive Format Support:** Convert seamlessly between formats like COCO, YOLOv5-11, PascalVOC, KITTI, and more.
12-
- **Ease of Use:** Intuitive CLI and Python API for flexible integration into your workflows.
13-
- **Efficiency:** Memory-conscious processing ensures optimal performance, even with large datasets.
14-
- **Reliability:** Thoroughly tested with round-trip tests to maintain label consistency.
17+
## Get Started Quickly
1518

16-
## Get Started
19+
1. **Install via pip**:
20+
```bash
21+
pip install labelformat
22+
```
23+
2. **Convert Labels in One Command**:
24+
```bash
25+
labelformat convert --task object-detection \
26+
--input-format coco \
27+
--input-file coco-labels/train.json \
28+
--output-format yolov8 \
29+
--output-file yolo-labels/data.yaml
30+
```
1731

18-
- [Installation](installation.md)
19-
- [Quick Start Guide](quick_start.md)
20-
- [Explore Features](features.md)
32+
## Supported Formats
2133

22-
## Join Our Community
34+
### **2D Object Detection Label Formats**
2335

24-
Labelformat is actively maintained by [Lightly](https://www.lightly.ai), a company dedicated to building efficient active learning pipelines. We welcome contributions and feedback—check out our [Contributing Guide](contributing.md) to get involved!
36+
| Format | Read ✔️ | Write ✔️ |
37+
|--------------|---------|----------|
38+
| COCO | ✔️ | ✔️ |
39+
| KITTI | ✔️ | ✔️ |
40+
| Labelbox | ✔️ ||
41+
| Lightly | ✔️ | ✔️ |
42+
| PascalVOC | ✔️ | ✔️ |
43+
| YOLOv5 - v11 | ✔️ | ✔️ |
2544

2645
---
2746

47+
### **2D Instance Segmentation Label Formats**
48+
49+
| Format | Read ✔️ | Write ✔️ |
50+
|--------------|---------|----------|
51+
| COCO | ✔️ | ✔️ |
52+
| YOLOv8 | ✔️ | ✔️ |
53+
54+
55+
## Explore More
56+
- [Quick Start Guide](quick-start.md)
57+
- [Detailed Usage Guide](usage.md)
58+
- [List of all features](features.md)
59+
---
60+
2861
## 📦 Quick Links
2962

3063
- [GitHub Repository](https://github.com/lightly-ai/labelformat)
3164
- [PyPI Package](https://pypi.org/project/labelformat/)
32-
- [Documentation](https://labelformat.com)
65+
- [Documentation](https://labelformat.com)
66+
67+
Labelformat is maintained by [Lightly](https://www.lightly.ai).

docs/installation.md

+22-6
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,32 @@ Installing **Labelformat** is straightforward. Follow the steps below to set up
44

55
## Prerequisites
66

7-
- **Python 3.7 or higher:** Ensure you have Python installed. You can download it from the [official website](https://www.python.org/downloads/).
7+
- **Python 3.7 or higher:** Ensure you have Python installed on Windows, Linux, or macOS.
88
- **pip:** Python's package installer. It typically comes with Python installations.
99

10-
## Installation via PyPI
10+
## Installation using package managers
1111

12-
You can install Labelformat directly from PyPI using pip:
12+
Labelformat is available on PyPI and can be installed using various package managers:
1313

14-
```shell
15-
pip install labelformat
16-
```
14+
=== "pip"
15+
```bash
16+
pip install labelformat
17+
```
18+
19+
=== "Poetry"
20+
```bash
21+
poetry add labelformat
22+
```
23+
24+
=== "Conda"
25+
```bash
26+
conda install -c conda-forge labelformat
27+
```
28+
29+
=== "Rye"
30+
```bash
31+
rye add labelformat
32+
```
1733

1834
## Installation from Source
1935

docs/tutorials/converting-coco-to-yolov8.md

+2-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This tutorial walks you through converting object detection labels from the COCO
44

55
## Prerequisites
66

7-
- **Labelformat Installed:** Follow the [Installation Guide](installation.md).
7+
- **Labelformat Installed:** Follow the [Installation Guide](../installation.md).
88
- **COCO Dataset:** Ensure you have a COCO-formatted dataset ready for conversion.
99

1010
## Step 1: Prepare Your Dataset
@@ -145,8 +145,4 @@ You've successfully converted COCO labels to YOLOv8 format using both the CLI an
145145

146146
## Next Steps
147147

148-
- Explore [Converting YOLOv8 to COCO](converting_yolov8_to_coco.md).
149-
- Learn how to [Handle Labelbox Exports](handling_labelbox_exports.md).
150-
- Dive deeper with [Advanced Usage](usage.md).
151-
152-
For any questions or issues, feel free to reach out via our [GitHub Issues](https://github.com/lightly-ai/labelformat/issues).
148+
- Explore other supported 2d object detection formats in the [Supported Object Detection Formats](../formats/object-detection/index.md) section.

docs/usage.md

+6-18
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,8 @@
1-
# usage.md
2-
31
# Detailed Usage Guide
42

53
Labelformat offers both a Command-Line Interface (CLI) and a Python API to cater to different workflows. This guide provides in-depth instructions on how to use both interfaces effectively.
64

7-
## Table of Contents
8-
9-
- [CLI Usage](#cli-usage)
10-
- [Basic Conversion Command](#basic-conversion-command)
11-
- [Advanced CLI Options](#advanced-cli-options)
12-
- [Python API Usage](#python-api-usage)
13-
- [Basic Conversion](#basic-conversion)
14-
- [Customizing Conversion](#customizing-conversion)
15-
- [Common Tasks](#common-tasks)
16-
- [Handling Category Names](#handling-category-names)
17-
- [Managing Image Paths](#managing-image-paths)
18-
19-
---
5+
To get a detailed overview of the supported formats and their specifications, please refer to the [Supported Object Detection Formats](formats/object-detection/index.md) section.
206

217
## CLI Usage
228

@@ -57,7 +43,9 @@ labelformat convert --task object-detection --help
5743

5844
**Specifying Category Names:**
5945

60-
Some formats require explicit category names. Use the `--category-names` argument:
46+
Some formats require explicit category names. The names must be separated by commas and must be in the same order as the categories in the input file.
47+
48+
Use the `--category-names` argument to specify the category names:
6149

6250
``` shell
6351
labelformat convert \
@@ -72,7 +60,7 @@ labelformat convert \
7260

7361
**Handling Missing Images:**
7462

75-
When converting formats that require image files (e.g., YOLO to COCO), ensure your image paths are correctly specified. Use `--images-rel-path` to define the relative path to images:
63+
When converting formats that require image files (e.g., YOLO to COCO), ensure your image paths are correctly specified. Use `--images-rel-path` to define the relative path from the input folder to the images folder:
7664

7765
``` shell
7866
labelformat convert \
@@ -176,4 +164,4 @@ labelformat convert \
176164
- **Consistent Naming:** Maintain consistent naming conventions for categories and files across different formats.
177165
- **Leverage Round-Trip Tests:** Use Labelformat's testing capabilities to ensure label consistency when converting back and forth between formats.
178166

179-
For more detailed examples and advanced usage scenarios, explore our [Tutorials](tutorials/converting_coco_to_yolov8.md) section.
167+
For more detailed examples and advanced usage scenarios, explore our [Tutorials](tutorials/converting-coco-to-yolov8.md) section.

mkdocs.yml

+18
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ theme:
99
- navigation.tabs
1010
- navigation.tabs.sticky
1111
- navigation.indexes
12+
- content.tabs.link
1213
palette:
1314
scheme: slate
1415
primary: grey
@@ -51,9 +52,26 @@ plugins:
5152
- git-revision-date-localized:
5253
type: date
5354

55+
extra:
56+
analytics:
57+
provider: google
58+
property: G-K4PH64C9BM
59+
consent:
60+
title: Cookie consent
61+
description: >-
62+
We use cookies to recognize your repeated visits and preferences, as well
63+
as to measure the effectiveness of our documentation and whether users
64+
find what they're searching for. With your consent, you're helping us to
65+
make our documentation better.
66+
67+
extra_javascript:
68+
- assets/js/analytics.js
69+
5470
markdown_extensions:
5571
- admonition
5672
- codehilite
5773
- toc:
5874
permalink: true
5975
- pymdownx.superfences
76+
- pymdownx.tabbed:
77+
alternate_style: true

0 commit comments

Comments
 (0)