Skip to main content

Computer vision toolbox for road infrastructure analysis

Project description

CV Toolbox

A comprehensive computer vision toolbox for road infrastructure analysis.

Installation

From PyPI (Recommended)

# Install the latest version
pip install lcvtoolbox

# Install a specific version
pip install lcvtoolbox==1.0.1

# Install with optional dependencies
pip install lcvtoolbox[dev]  # Development tools
pip install lcvtoolbox[docs]  # Documentation tools
pip install lcvtoolbox[dev,docs]  # All optional dependencies

From Source

# Clone the repository
git clone https://github.com/logiroad/cv-toolbox.git
cd cv-toolbox

# Install in development mode
pip install -e ".[dev]"

System Requirements

  • Python 3.12 or higher
  • pip (Python package installer)

For OpenCV support, you may need system libraries:

# Ubuntu/Debian
sudo apt-get update && sudo apt-get install -y \
    libglib2.0-0 libsm6 libxext6 libxrender-dev libgomp1

# macOS
brew install opencv

# Windows: Should work out of the box

Quick Start

Command Line Interface

# Check installation
cv-toolbox --help
toolbox --help  # Alternative command

# Example usage (when implemented)
cv-toolbox process --input image.jpg --output result.jpg

Python API

import lcvtoolbox

# Example usage of spatial primitives
from lcvtoolbox.spatial.primitives import Point, Vector

# Create a 3D point
point = Point(x=1.0, y=2.0, z=3.0)

# Create a vector
vector = Vector(x=0.0, y=0.0, z=1.0)

# More examples coming soon...

Development

Setting up Development Environment

# Clone the repository
git clone https://github.com/logiroad/cv-toolbox.git
cd cv-toolbox

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=lcvtoolbox

# Run specific test categories
pytest -m "not slow"  # Skip slow tests
pytest -m integration  # Only integration tests
pytest -m unit  # Only unit tests

Code Quality

# Format code
ruff format lcvtoolbox/ tests/

# Lint code
ruff check lcvtoolbox/ tests/

# Type checking
mypy lcvtoolbox/

Building the Package

# Clean previous builds
make clean

# Build the package
make build

# This creates:
# - dist/lcvtoolbox-X.Y.Z-py3-none-any.whl
# - dist/lcvtoolbox-X.Y.Z.tar.gz

Docker Support

Using with Docker

FROM python:3.12-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    libglib2.0-0 libsm6 libxext6 libxrender-dev libgomp1 \
    && rm -rf /var/lib/apt/lists/*

# Install lcvtoolbox from PyPI
RUN pip install lcvtoolbox

# Copy your application
COPY . .

CMD ["cv-toolbox"]

Build and run:

docker build -t my-cv-app .
docker run -it my-cv-app

Features

Spatial Primitives

  • Points and Vectors: 3D point and vector operations
  • Rotations: Support for multiple rotation representations (quaternion, Euler angles, rotation matrix, axis-angle)
  • Poses: 6DOF pose representations with transformations
  • Coordinate Transformations: Convert between different coordinate systems

Computer Vision Tools

  • Image Processing: Cropping, tiling, and preprocessing utilities
  • CVAT Integration: API client for CVAT annotation platform
  • Hugging Face Integration: Tools for dataset management

CLI Tools

  • Unified command-line interface for all toolbox features
  • Extensible plugin architecture

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure:

  • All tests pass (pytest)
  • Code is formatted (ruff format)
  • Code passes linting (ruff check)
  • Type hints are correct (mypy)

Vocabulaire

Types d'images

  • originals: images d'origine
  • drawn_bbox: images d'origine avec une fissure encadrée en rouge
  • crops: vignettes avec la zone à l'intérieur de l'encadré en rouge extraite
  • tiles: images carrées extraites des vignettes par tiling et padding pour l'entrainement du modèle

Splits

Les "splits" sont les parties de la base de données destinés aux étapes d'entrainement, validation et test du modèle:

  • train: données d'entrainement du modèle
  • validation: données de validation du modèle
  • test: données de test du modèle

Annotations

Les annotations utilisent plusieurs concepts:

  • label: représente la classe de l'annotation
  • tag: type d'annotation de classification pure dans laquelle il n'y a pas de détection d'objet
  • detection: type d'annotation dans laquelle il y a une détection d'objet, avec par exemple un masque, une bounding box
  • mask: masque de segmentation
  • bbox: bounding box
  • attribute: clef/valeur représentant un attribut (ex: Orientation:Transversale)

License

Copyright (c) 2025 Logiroad. All rights reserved.

Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lcvtoolbox-1.0.2.tar.gz (100.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lcvtoolbox-1.0.2-py3-none-any.whl (120.2 kB view details)

Uploaded Python 3

File details

Details for the file lcvtoolbox-1.0.2.tar.gz.

File metadata

  • Download URL: lcvtoolbox-1.0.2.tar.gz
  • Upload date:
  • Size: 100.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for lcvtoolbox-1.0.2.tar.gz
Algorithm Hash digest
SHA256 fcdd44a0cff9ad3defab77e5f492fd6cdb49d2b4ee152e67fa61e4e9ce784096
MD5 6848bdc79f5df42edd31fb8f6d7ea8ed
BLAKE2b-256 5fee9c12d570edd047f6c1dbfe21c4478b88669411fbded236fda1c86c293ade

See more details on using hashes here.

File details

Details for the file lcvtoolbox-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: lcvtoolbox-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 120.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for lcvtoolbox-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 18c9f15a7a86bce6e10250cf51de526431c918f9b47e45296bf2dbb6c7791e45
MD5 bc95da22c20b6059d6107872b7b5d095
BLAKE2b-256 cfbdcfbd131356d7f9a7db28bc5c994466aabaa9ba4019b22b1c39ec7a16fc81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page