Skip to content

inbo/Labelme

Repository files navigation

Labeling orthomosaics semi-automatically in labelme

Requirements

  • Pycharm (community edition)
  • Python 3.12
  • QGis 3.40.4

Install python modules

  1. Open terminal in Pycharm. Make sure your (pip) environment is activated and that your are in the directory where your requirements.txt is located.
  2. Type following command in the terminal
pip install -r requirements.txt

🚀 Ready to start 🚀

Processing steps

  1. Modify the hyperparameters in the .env file.
  2. drawRaster.py: makes raster of tiles for DL model, select buffer to be large enough to cover full orthomosaic.
  3. correctRaster.py: remove empty boxes (with no pixels).
  4. In QGIS: Make a copy of your tile file and select the tiles that have a dead tree within the tile (data of Thomas).
  5. extractTiles.py: crop the orthomosaic to the extent of every box.
  6. Label the images using labelme. Type following command in the terminal:
labelme 

or reference directly to your folder and add your pre-defined labels:

labelme ./Images/FC --labels labels.txt --nodata --validatelabel exact --config '{shift_auto_shape_color: -2}'

or reference directly to your folder and add your pre-defined flags (for annotation or classification):

labelme ./Images/FC --flags flags.txt --nodata
  1. Convert_json_to_polygons.py: make shape file with labels.
  2. Merge the alive trees and dead trees, dissolve boundaries. Make sure the dead trees are on top of the alive trees (shape_labels_merging.model3 script in QGIS).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages