Git Product home page Git Product logo

yaltai's Introduction

YALTAi

You Actually Look Twice At it

This provides an adapter for Kraken to use YOLOv5 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 alto-to-yolo PATH/TO/ALTOorPAGE/*.xml my-dataset --shuffle .1 --segmonto region

And then train YOLO

# Download YOLOv5
git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
git checkout v6.2
pip install -r requirements.txt  # install
# Train your YOLOv5 data (YOLOv5 is installed with YALTAi)
python train.py --data "../my-dataset/config.yml" --batch-size 4 --img 640 --weights yolov5x.pt --epochs 50

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.

yaltai's People

Contributors

ponteineptique avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.