You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
training scripts (trainSyndata.py) imports test.py. test.py has some code not nested in if __name__ == "__main__":. For example, this below code that parses argument:
is part of test.py and it is not within if __name__ == "__main__":. This means whenever test.py is imported, this code runs. You can see the error with:
python trainSyndata.py --help
which prints
usage: trainSyndata.py [-h] [--trained_model TRAINED_MODEL]
[--text_threshold TEXT_THRESHOLD] [--low_text LOW_TEXT]
[--link_threshold LINK_THRESHOLD] [--cuda CUDA]
[--canvas_size CANVAS_SIZE] [--mag_ratio MAG_RATIO]
[--poly] [--show_time] [--test_folder TEST_FOLDER]
CRAFT Text Detection
optional arguments:
-h, --help show this help message and exit
--trained_model TRAINED_MODEL
pretrained model
--text_threshold TEXT_THRESHOLD
text confidence threshold
--low_text LOW_TEXT text low-bound score
--link_threshold LINK_THRESHOLD
link confidence threshold
--cuda CUDA Use cuda to train model
--canvas_size CANVAS_SIZE
image size for inference
--mag_ratio MAG_RATIO
image magnification ratio
--poly enable polygon type
--show_time show processing time
--test_folder TEST_FOLDER
folder path to input images
The above print statement is for args written in test.py, not for trainSyndata.py. Nesting the arguments within the if statement in test.py fixed the error.
watershed.py uses Polygon library, but I can't seem to find how to install this library. Any hints?
The text was updated successfully, but these errors were encountered:
ThisIsIsaac
added a commit
to ThisIsIsaac/CRAFT-Reimplementation
that referenced
this issue
Nov 4, 2019
trainSyndata.py
) importstest.py
.test.py
has some code not nested inif __name__ == "__main__":
. For example, this below code that parses argument:is part of
test.py
and it is not withinif __name__ == "__main__":
. This means whenevertest.py
is imported, this code runs. You can see the error with:which prints
The above print statement is for
args
written intest.py
, not fortrainSyndata.py
. Nesting the arguments within the if statement intest.py
fixed the error.watershed.py
usesPolygon
library, but I can't seem to find how to install this library. Any hints?The text was updated successfully, but these errors were encountered: