Skip to content

MycoAI/detect-relabel-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirement

  1. Python >= 3.11
  2. pip >= 24.3

Installation

git clone https://github.com/MycoAI/detect-relabel-tool
cd detect-relabel-tool
pip install -r requirements.txt

How to run

  1. text_in_label.py
  • For text in label, the text must be in format of <text 1> <label_id> <text 2>
  • label id must be a 3 digits and 2 alphanumeric. Eg: 123-A1, 567-1B
  • See examples/before_labeling/D0.jpg for illustration.
  • Run examples.
python text_in_label.py --before=examples/before_labeling --after=examples/output --envi=CREA+CYA+YES+MEA
  • You will see it copies D1, D2, D3, D4 from examples/before_labeling and rename them to text_1 label_id environment text_2 in output based on the label of D0.
  1. text_in_csv.py
  • In order to run this, you'll need information in a csv file, see demo.csv.
  • In this case, I consider all text are label_id. Environment and text_1, text_2 will be added in csv files
  • Run examples
python text_in_csv.py --before=examples/before_labeling --after=examples/after_labeling --meta=demo.csv
  • You will see it copies D1, D2, D3, D4 from examples/before_labeling and rename them to text_1 label_id environment text_2 in output based on the label of D0 and csv file.

About

Script to detect content of the labeled data and rename images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages