Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCR network seems not working #4

Closed
zoidburg opened this issue Sep 12, 2018 · 4 comments
Closed

OCR network seems not working #4

zoidburg opened this issue Sep 12, 2018 · 4 comments

Comments

@zoidburg
Copy link

hi,
Thanks for sharing your work! I tried to test the project using run.sh, everything was OK except that the OCR network output "No characters found" for each plate image; I tried to adjust the detection threshold but it didn't work. So what seems the problem and how should I solve it?

Following is the output of run.sh. Plate images have been extracted successfully, but characters are not detected. So is there any thing (like image pre-processing) missing before I input images into the OCR net?

Press any key to continue...
layer filters size input output
0 conv 32 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 32 0.299 BFLOPs
1 max 2 x 2 / 2 416 x 416 x 32 -> 208 x 208 x 32
2 conv 64 3 x 3 / 1 208 x 208 x 32 -> 208 x 208 x 64 1.595 BFLOPs
3 max 2 x 2 / 2 208 x 208 x 64 -> 104 x 104 x 64
4 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BFLOPs
5 conv 64 1 x 1 / 1 104 x 104 x 128 -> 104 x 104 x 64 0.177 BFLOPs
6 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BFLOPs
7 max 2 x 2 / 2 104 x 104 x 128 -> 52 x 52 x 128
8 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BFLOPs
9 conv 128 1 x 1 / 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BFLOPs
10 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BFLOPs
11 max 2 x 2 / 2 52 x 52 x 256 -> 26 x 26 x 256
12 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BFLOPs
13 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BFLOPs
14 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BFLOPs
15 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BFLOPs
16 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BFLOPs
17 max 2 x 2 / 2 26 x 26 x 512 -> 13 x 13 x 512
18 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BFLOPs
19 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BFLOPs
20 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BFLOPs
21 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BFLOPs
22 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BFLOPs
23 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 3.190 BFLOPs
24 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 3.190 BFLOPs
25 route 16
26 conv 64 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 64 0.044 BFLOPs
27 reorg / 2 26 x 26 x 64 -> 13 x 13 x 256
28 route 27 24
29 conv 1024 3 x 3 / 1 13 x 13 x1280 -> 13 x 13 x1024 3.987 BFLOPs
30 conv 125 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 125 0.043 BFLOPs
31 detection
mask_scale: Using default '1.000000'
Loading weights from data/vehicle-detector/yolo-voc.weights...Done!
Searching for vehicles using YOLO...
Scanning samples/03009.jpg
2 cars found
Scanning samples/03016.jpg
1 cars found
Scanning samples/03025.jpg
1 cars found
Scanning samples/03033.jpg
1 cars found
Scanning samples/03057.jpg
1 cars found
Scanning samples/03058.jpg
2 cars found
Scanning samples/03066.jpg
3 cars found
Scanning samples/03071.jpg
1 cars found
Using TensorFlow backend.
2018-09-12 01:32:41.038583: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-09-12 01:32:41.175064: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 0 with properties:
name: TITAN X (Pascal) major: 6 minor: 1 memoryClockRate(GHz): 1.607
pciBusID: 0000:06:00.0
totalMemory: 11.90GiB freeMemory: 11.57GiB
2018-09-12 01:32:41.309589: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1356] Found device 1 with properties:
name: TITAN X (Pascal) major: 6 minor: 1 memoryClockRate(GHz): 1.531
pciBusID: 0000:0b:00.0
totalMemory: 11.90GiB freeMemory: 11.22GiB
2018-09-12 01:32:41.310954: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1435] Adding visible gpu devices: 0, 1
2018-09-12 01:32:41.831018: I tensorflow/core/common_runtime/gpu/gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-09-12 01:32:41.831073: I tensorflow/core/common_runtime/gpu/gpu_device.cc:929] 0 1
2018-09-12 01:32:41.831092: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 0: N Y
2018-09-12 01:32:41.831108: I tensorflow/core/common_runtime/gpu/gpu_device.cc:942] 1: Y N
2018-09-12 01:32:41.831697: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 11199 MB memory) -> physical GPU (device: 0, name: TITAN X (Pascal), pci bus id: 0000:06:00.0, compute capability: 6.1)
2018-09-12 01:32:41.984898: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:1 with 10866 MB memory) -> physical GPU (device: 1, name: TITAN X (Pascal), pci bus id: 0000:0b:00.0, compute capability: 6.1)
Searching for license plates using WPOD-NET
Processing output/03033_0car.png
Bound dim: 476, ratio: 1.606780
Processing output/03058_1car.png
Bound dim: 372, ratio: 1.288136
Processing output/03009_1car.png
Bound dim: 608, ratio: 3.037433
Processing output/03066_1car.png
Bound dim: 490, ratio: 1.685950
Processing output/03025_0car.png
Bound dim: 568, ratio: 1.958333
Processing output/03066_2car.png
Bound dim: 608, ratio: 2.135135
Processing output/03071_0car.png
Bound dim: 608, ratio: 2.156250
Processing output/03016_0car.png
Bound dim: 606, ratio: 2.052117
Processing output/03009_0car.png
Bound dim: 524, ratio: 1.798773
Processing output/03066_0car.png
Bound dim: 544, ratio: 1.889503
Processing output/03057_0car.png
Bound dim: 526, ratio: 1.804819
Processing output/03058_0car.png
Bound dim: 346, ratio: 1.159664
layer filters size input output
0 conv 32 3 x 3 / 1 240 x 80 x 3 -> 240 x 80 x 32 0.033 BFLOPs
1 max 2 x 2 / 2 240 x 80 x 32 -> 120 x 40 x 32
2 conv 64 3 x 3 / 1 120 x 40 x 32 -> 120 x 40 x 64 0.177 BFLOPs
3 max 2 x 2 / 2 120 x 40 x 64 -> 60 x 20 x 64
4 conv 128 3 x 3 / 1 60 x 20 x 64 -> 60 x 20 x 128 0.177 BFLOPs
5 conv 64 1 x 1 / 1 60 x 20 x 128 -> 60 x 20 x 64 0.020 BFLOPs
6 conv 128 3 x 3 / 1 60 x 20 x 64 -> 60 x 20 x 128 0.177 BFLOPs
7 max 2 x 2 / 2 60 x 20 x 128 -> 30 x 10 x 128
8 conv 256 3 x 3 / 1 30 x 10 x 128 -> 30 x 10 x 256 0.177 BFLOPs
9 conv 128 1 x 1 / 1 30 x 10 x 256 -> 30 x 10 x 128 0.020 BFLOPs
10 conv 256 3 x 3 / 1 30 x 10 x 128 -> 30 x 10 x 256 0.177 BFLOPs
11 conv 512 3 x 3 / 1 30 x 10 x 256 -> 30 x 10 x 512 0.708 BFLOPs
12 conv 256 3 x 3 / 1 30 x 10 x 512 -> 30 x 10 x 256 0.708 BFLOPs
13 conv 512 3 x 3 / 1 30 x 10 x 256 -> 30 x 10 x 512 0.708 BFLOPs
14 conv 80 1 x 1 / 1 30 x 10 x 512 -> 30 x 10 x 80 0.025 BFLOPs
15 detection
mask_scale: Using default '1.000000'
Loading weights from data/ocr/ocr-net.weights...Done!
Performing OCR...
Scanning output/03066_2car_lp.png
No characters found
Scanning output/03009_0car_lp.png
No characters found
Scanning output/03016_0car_lp.png
No characters found
Scanning output/03057_0car_lp.png
No characters found
Scanning output/03025_0car_lp.png
No characters found
Scanning output/03058_1car_lp.png
No characters found
Scanning output/03033_0car_lp.png
No characters found
Scanning output/03071_0car_lp.png
No characters found

@inamesion
Copy link

hi,
In the file of /data/ocr/ocr-net.cfg batch = 64 changes to batch = 1

@zoidburg
Copy link
Author

@inamesion
Thanks a lot, it worked!

This was referenced Sep 20, 2018
@sergiomsilva
Copy link
Owner

Thank you @inamesion ! I just updated the file with this correction.

@dingning94 dingning94 mentioned this issue Nov 6, 2018
@rochesterlmg
Copy link

after set batch = 1, still can not recognize the plate. output is still as below
No characters found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants