tesseract-ocr / tesstrain

Train Tesseract LSTM with make
Apache License 2.0
637 stars 188 forks source link

Feature Request: make clean #89

Closed Shreeshrii closed 4 years ago

Shreeshrii commented 5 years ago

Currently

# Clean all generated files
clean:
    find $(GROUND_TRUTH_DIR) -name '*.box' -delete
    find $(GROUND_TRUTH_DIR) -name '*.lstmf' -delete
    rm -rf $(OUTPUT_DIR)

In certain cases it maybe desirable to not redo the processing for box files and lstmf files but to rerun just the training part. I suggest multiple clean targets eg.

make clean-box make clean-lstmf make clean-output

and

make clean (that cleans all files).

wrznr commented 4 years ago

@Shreeshrii Don't close it! It is still a valid Feature Request, right? I was pretty busy with other stuff lately, but will eventually get to this one. Pls. apologize the delay.

songzy12 commented 4 years ago

My current feeling about this feature request is that we just need to change the collowing code: https://github.com/tesseract-ocr/tesstrain/blob/e9b375f9b3d293e51a0cfdb8e276e5f22af8d1e8/Makefile#L331-L335

into something like:

# Clean generated .box files
clean-box:
    find $(GROUND_TRUTH_DIR) -name '*.box' -delete

# Clean generated .lstmf files
clean-lstmf:
    find $(GROUND_TRUTH_DIR) -name '*.lstmf' -delete

# Clean generated ouptut files
clean-output:
    rm -rf $(OUTPUT_DIR)

# Clean all generated files
clean: clean-box clean-lstmf clean-output   

Do you want me to send a pull request about this?

kba commented 4 years ago

Do you want me to send a pull request about this?

👍 @songzy12