Skip to main content

You Actually Look Twice At it, YOLOv5-Kraken adapter for region detection

Project description

YALTAi

You Actually Look Twice At it

This provides an adapter for Kraken to use YOLOv8 (1.0.0 update; use previous version to reuse YOLOv5 models) Object Detection routine.

This tool can be used for both segmenting and conversion of models.

Routine

Instal

pip install YALTAi

Training

Convert (and split optionally) your data

# Keeps .1 data in the validation set and convert all alto into YOLOv5 format
#  Keeps the segmonto information up to the regions
yaltai convert alto-to-yolo PATH/TO/ALTOorPAGE/*.xml my-dataset --shuffle .1 --segmonto region

And then train YOLO

yolo task=detect mode=train model=yolov8n.pt data=my-dataset/config.yml epochs=100 plots=True device=0 batch=8 imgsz=960

Predicting

YALTAi has the same CLI interface as Kraken, so:

  • You can use base BLLA model for line or provide yours with -i model.mlmodel
  • Use a GPU (--device cuda:0) or a CPU (--device cpu)
  • Apply on batch (*.jpg)
# Retrieve the best.pt after the training
# It should be in runs/train/exp[NUMBER]/weights/best.pt
# And then annotate your new data with the same CLI API as Kraken !
yaltai kraken --device cuda:0 -I "*.jpg" --suffix ".xml" segment --yolo runs/train/exp5/weights/best.pt

Metrics

The metrics produced from various libraries never gives the same mAP or Precision. I tried

  • object-detection-metrics==0.4
  • mapCalc
  • mean-average-precision which ended up being the chosen one (cleanest in terms of how I can access info)

and of course I compared with YOLOv5 raw results. Nothing worked the same. And the library YOLOv5 derives its metrics from is uninstallable through pip.

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

YALTAi-2.0.3.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

YALTAi-2.0.3-py2.py3-none-any.whl (40.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file YALTAi-2.0.3.tar.gz.

File metadata

  • Download URL: YALTAi-2.0.3.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for YALTAi-2.0.3.tar.gz
Algorithm Hash digest
SHA256 4bf7c1ca26d980db2d1185c36ff5423c831872a1fe50bf4ebed693a04a9265d8
MD5 52bd37e2abd2036969980610e6604abb
BLAKE2b-256 5d5513e600da5ca838e968127a6affb0bcf2dc697986e829ab870b69bde20c84

See more details on using hashes here.

File details

Details for the file YALTAi-2.0.3-py2.py3-none-any.whl.

File metadata

  • Download URL: YALTAi-2.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 40.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for YALTAi-2.0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0a35d152491956526cf936ca4f71523f27dbf8f647f090fc4ad53e4b65fca41c
MD5 cdf1041059cd2452cfdd78926ec157f3
BLAKE2b-256 76823b1e24c808d8945f258618f4cfc6be4e78593255eae1be379eb6d1f673d1

See more details on using hashes here.

Supported by

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