- Set up YOLO with this repository -> https://github.com/AlexeyAB/darknet
- Put
objectDetector.py
andocr.py
insidex64
folder - Make a folder named
validation
and putsequenceMatcher.py
inside
about each file
- for object detection
- asks used to input the path of the image to test
- you can change the
command
value depending on your needdarknet_no_gput.exe
for windows with no gpudarknet.exe
for windows with gpu
- for text recognition
- asks user to input the path of the image to test (the same path you used for object detection)
- change
PATH
andIMAGES_PATH
valuesPATH
= whole path for thex64
folderIMAGES_PATH
= you can make another folder insidex64
to put all preprocessed images and final results`- line 64 is where you save the final result, please change the path in accordance to what you have
- if you want to save denoised and grayscaled images, uncomment lines no. 17 and 21
- this code was used to test the 30 text recognition results (results are in text file for each image) in bulk
- sample test filenames are
TEST_1.txt
,TEST_2.txt
, TEST_30.txt` - depending on how many text files you want to test, you can change the
i
value in line 7 = which file to startwhile (i <= __):
in line 9 = in the blank, change the number to until which file you want to stop testing- inside a test file are the class name (in number), original text, and actual result separated by the character
|
, a newline for each class
yolo-obj.cfg
anddata
folder were used for training the detector- YOLO weights are available in https://bit.ly/2XA0fnW