- Python >= 3.11
- pip >= 24.3
git clone https://github.com/MycoAI/detect-relabel-tool
cd detect-relabel-tool
pip install -r requirements.txt- 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.jpgfor 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_2in output based on the label of D0.
- 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_2in output based on the label of D0 and csv file.