Browse Source

update code

pull/1/MERGE
jackyu 7 years ago
parent
commit
babc8d53fc
100 changed files with 16 additions and 9 deletions
  1. +16
    -9
      benchmark.py
  2. BIN
      cache/bad2/川QEZ982.png
  3. BIN
      cache/bad2/沪A85J08.png
  4. BIN
      cache/bad2/沪B14292.png
  5. BIN
      cache/bad2/沪B74992.png
  6. BIN
      cache/bad2/沪BE3658.png
  7. BIN
      cache/bad2/沪BE4823.png
  8. BIN
      cache/bad2/沪C91620.png
  9. BIN
      cache/bad2/沪CT8805.png
  10. BIN
      cache/bad2/沪D47466.png
  11. BIN
      cache/bad2/沪D49228.png
  12. BIN
      cache/bad2/沪D64396.png
  13. BIN
      cache/bad2/沪D96625.png
  14. BIN
      cache/bad2/沪DA3529.png
  15. BIN
      cache/bad2/沪DB8392.png
  16. BIN
      cache/bad2/沪DE9133.png
  17. BIN
      cache/bad2/沪LS6555.png
  18. BIN
      cache/bad2/浙A00384.png
  19. BIN
      cache/bad2/浙A077AY.png
  20. BIN
      cache/bad2/浙A0A353.png
  21. BIN
      cache/bad2/浙A197E7.png
  22. BIN
      cache/bad2/浙A199N1.png
  23. BIN
      cache/bad2/浙A1A085.png
  24. BIN
      cache/bad2/浙A1MQ29.png
  25. BIN
      cache/bad2/浙A201S2.png
  26. BIN
      cache/bad2/浙A205LK.png
  27. BIN
      cache/bad2/浙A3A570.png
  28. BIN
      cache/bad2/浙A3B213.png
  29. BIN
      cache/bad2/浙A3BR15.png
  30. BIN
      cache/bad2/浙A3DP91.png
  31. BIN
      cache/bad2/浙A3E732.png
  32. BIN
      cache/bad2/浙A3GK73.png
  33. BIN
      cache/bad2/浙A3ZM60.png
  34. BIN
      cache/bad2/浙A40924.png
  35. BIN
      cache/bad2/浙A502CX.png
  36. BIN
      cache/bad2/浙A509ZN.png
  37. BIN
      cache/bad2/浙A5709F.png
  38. BIN
      cache/bad2/浙A5770D.png
  39. BIN
      cache/bad2/浙A6UD87.png
  40. BIN
      cache/bad2/浙A71W58.png
  41. BIN
      cache/bad2/浙A727UU.png
  42. BIN
      cache/bad2/浙A7EB28.png
  43. BIN
      cache/bad2/浙A7F908.png
  44. BIN
      cache/bad2/浙A8DW01.png
  45. BIN
      cache/bad2/浙A8NC86.png
  46. BIN
      cache/bad2/浙A908BE.png
  47. BIN
      cache/bad2/浙A977K7.png
  48. BIN
      cache/bad2/浙AA9M52.png
  49. BIN
      cache/bad2/浙AAQ185.png
  50. BIN
      cache/bad2/浙AB8Y02.png
  51. BIN
      cache/bad2/浙AE5Z68.png
  52. BIN
      cache/bad2/浙AHD113.png
  53. BIN
      cache/bad2/浙AHH150.png
  54. BIN
      cache/bad2/浙AHV989.png
  55. BIN
      cache/bad2/浙AJ509M.png
  56. BIN
      cache/bad2/浙AJ9454.png
  57. BIN
      cache/bad2/浙AL0A26.png
  58. BIN
      cache/bad2/浙AL270V.png
  59. BIN
      cache/bad2/浙AM530Y.png
  60. BIN
      cache/bad2/浙AQ5855.png
  61. BIN
      cache/bad2/浙AQ7007.png
  62. BIN
      cache/bad2/浙ASM539.png
  63. BIN
      cache/bad2/浙AT039E.png
  64. BIN
      cache/bad2/浙AU8B07.png
  65. BIN
      cache/bad2/浙AUE830.png
  66. BIN
      cache/bad2/浙AY3E97.png
  67. BIN
      cache/bad2/浙AY836H.png
  68. BIN
      cache/bad2/浙AZ557H.png
  69. BIN
      cache/bad2/浙AZ6R27.png
  70. BIN
      cache/bad2/浙CL2J67.png
  71. BIN
      cache/bad2/浙DDD691.png
  72. BIN
      cache/bad2/浙DVE625.png
  73. BIN
      cache/bad2/浙DX0L91.png
  74. BIN
      cache/bad2/浙DX9H10.png
  75. BIN
      cache/bad2/浙E13183.png
  76. BIN
      cache/bad2/浙E19333.png
  77. BIN
      cache/bad2/浙E2230H.png
  78. BIN
      cache/bad2/浙E3489E.png
  79. BIN
      cache/bad2/浙E3679Z.png
  80. BIN
      cache/bad2/浙E37178.png
  81. BIN
      cache/bad2/浙E3899D.png
  82. BIN
      cache/bad2/浙E5183N.png
  83. BIN
      cache/bad2/浙E58556.png
  84. BIN
      cache/bad2/浙E6961E.png
  85. BIN
      cache/bad2/浙E7900H.png
  86. BIN
      cache/bad2/浙E8389Y.png
  87. BIN
      cache/bad2/浙EA3262.png
  88. BIN
      cache/bad2/浙EA5375.png
  89. BIN
      cache/bad2/浙EA6929.png
  90. BIN
      cache/bad2/浙EA7581.png
  91. BIN
      cache/bad2/浙EAD017.png
  92. BIN
      cache/bad2/浙EAS529.png
  93. BIN
      cache/bad2/浙EDD128.png
  94. BIN
      cache/bad2/浙EG0257.png
  95. BIN
      cache/bad2/浙EG6059.png
  96. BIN
      cache/bad2/浙EJ5933.png
  97. BIN
      cache/bad2/浙EK1921.png
  98. BIN
      cache/bad2/浙EK6611.png
  99. BIN
      cache/bad2/浙EL2100.png
  100. BIN
      cache/bad2/浙EL2516.png

+ 16
- 9
benchmark.py View File

@@ -25,6 +25,11 @@ def comparestring(a,b):
g+=1 g+=1
return g return g


#
# A = "赣FJ0368".decode("utf-8")
# B = "琼WJ0368".decode("utf-8")

# print "对比",comparestring(A,B)


count = 0 ; count = 0 ;


@@ -62,21 +67,23 @@ for filename in os.listdir(parent):
for one in dataset: for one in dataset:


# p = sm.StringMatcher(seq1=one.encode("utf-8"),seq2=name.encode("utf-8")) # p = sm.StringMatcher(seq1=one.encode("utf-8"),seq2=name.encode("utf-8"))
A = one.encode("utf-8")
B = name.encode("utf-8")
print one.encode("utf-8"),"<->",name.encode("utf-8"),"编辑距离:",comparestring(A,B)
if comparestring(A,B)<2:
A = one.decode("utf-8")
B = name.decode("utf-8")
print one.decode("utf-8"),"<->",name.decode("utf-8"),"编辑距离:",comparestring(A,B)
if comparestring(A,B)<3:
count_lev+=1 count_lev+=1
if one.encode("utf-8") == name.encode("utf-8"):
else:
cv2.imwrite("./cache/bad2/"+B+"->"+A+".png",image)

if one.decode("utf-8") == name.decode("utf-8"):
count_p+=1 count_p+=1
break break
else: else:
print "error",one.encode("utf-8"), name.encode("utf-8")
print "error",one.decode("utf-8"), name.decode("utf-8")
count_d+=1 count_d+=1
# cv2.imshow("image",image) # cv2.imshow("image",image)
# cv2.waitKey(0) # cv2.waitKey(0)
cv2.imwrite("./cache/bad2/"+name+".png",image)
break
# break






@@ -87,7 +94,7 @@ for filename in os.listdir(parent):


if count_p+count_d+count_undetected!=count: if count_p+count_d+count_undetected!=count:
print dataset,len(dataset) print dataset,len(dataset)
exit(0)
# exit(0)




# #


BIN
cache/bad2/川QEZ982.png View File

Before After
Width: 650  |  Height: 580  |  Size: 374 kB

BIN
cache/bad2/沪A85J08.png View File

Before After
Width: 650  |  Height: 580  |  Size: 318 kB

BIN
cache/bad2/沪B14292.png View File

Before After
Width: 650  |  Height: 580  |  Size: 247 kB

BIN
cache/bad2/沪B74992.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.7 MB

BIN
cache/bad2/沪BE3658.png View File

Before After
Width: 650  |  Height: 580  |  Size: 337 kB

BIN
cache/bad2/沪BE4823.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.9 MB

BIN
cache/bad2/沪C91620.png View File

Before After
Width: 650  |  Height: 580  |  Size: 364 kB

BIN
cache/bad2/沪CT8805.png View File

Before After
Width: 650  |  Height: 580  |  Size: 331 kB

BIN
cache/bad2/沪D47466.png View File

Before After
Width: 650  |  Height: 580  |  Size: 250 kB

BIN
cache/bad2/沪D49228.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.5 MB

BIN
cache/bad2/沪D64396.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.8 MB

BIN
cache/bad2/沪D96625.png View File

Before After
Width: 650  |  Height: 580  |  Size: 316 kB

BIN
cache/bad2/沪DA3529.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.8 MB

BIN
cache/bad2/沪DB8392.png View File

Before After
Width: 650  |  Height: 580  |  Size: 286 kB

BIN
cache/bad2/沪DE9133.png View File

Before After
Width: 650  |  Height: 580  |  Size: 353 kB

BIN
cache/bad2/沪LS6555.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.5 MB

BIN
cache/bad2/浙A00384.png View File

Before After
Width: 650  |  Height: 580  |  Size: 326 kB

BIN
cache/bad2/浙A077AY.png View File

Before After
Width: 650  |  Height: 580  |  Size: 341 kB

BIN
cache/bad2/浙A0A353.png View File

Before After
Width: 650  |  Height: 580  |  Size: 297 kB

BIN
cache/bad2/浙A197E7.png View File

Before After
Width: 650  |  Height: 580  |  Size: 373 kB

BIN
cache/bad2/浙A199N1.png View File

Before After
Width: 650  |  Height: 580  |  Size: 334 kB

BIN
cache/bad2/浙A1A085.png View File

Before After
Width: 650  |  Height: 580  |  Size: 367 kB

BIN
cache/bad2/浙A1MQ29.png View File

Before After
Width: 650  |  Height: 580  |  Size: 308 kB

BIN
cache/bad2/浙A201S2.png View File

Before After
Width: 650  |  Height: 580  |  Size: 351 kB

BIN
cache/bad2/浙A205LK.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.6 MB

BIN
cache/bad2/浙A3A570.png View File

Before After
Width: 650  |  Height: 580  |  Size: 295 kB

BIN
cache/bad2/浙A3B213.png View File

Before After
Width: 650  |  Height: 580  |  Size: 336 kB

BIN
cache/bad2/浙A3BR15.png View File

Before After
Width: 650  |  Height: 580  |  Size: 323 kB

BIN
cache/bad2/浙A3DP91.png View File

Before After
Width: 650  |  Height: 580  |  Size: 302 kB

BIN
cache/bad2/浙A3E732.png View File

Before After
Width: 650  |  Height: 580  |  Size: 365 kB

BIN
cache/bad2/浙A3GK73.png View File

Before After
Width: 650  |  Height: 580  |  Size: 386 kB

BIN
cache/bad2/浙A3ZM60.png View File

Before After
Width: 650  |  Height: 580  |  Size: 300 kB

BIN
cache/bad2/浙A40924.png View File

Before After
Width: 650  |  Height: 580  |  Size: 300 kB

BIN
cache/bad2/浙A502CX.png View File

Before After
Width: 650  |  Height: 580  |  Size: 400 kB

BIN
cache/bad2/浙A509ZN.png View File

Before After
Width: 650  |  Height: 580  |  Size: 319 kB

BIN
cache/bad2/浙A5709F.png View File

Before After
Width: 650  |  Height: 580  |  Size: 352 kB

BIN
cache/bad2/浙A5770D.png View File

Before After
Width: 650  |  Height: 580  |  Size: 363 kB

BIN
cache/bad2/浙A6UD87.png View File

Before After
Width: 650  |  Height: 580  |  Size: 374 kB

BIN
cache/bad2/浙A71W58.png View File

Before After
Width: 650  |  Height: 580  |  Size: 327 kB

BIN
cache/bad2/浙A727UU.png View File

Before After
Width: 650  |  Height: 580  |  Size: 354 kB

BIN
cache/bad2/浙A7EB28.png View File

Before After
Width: 650  |  Height: 580  |  Size: 375 kB

BIN
cache/bad2/浙A7F908.png View File

Before After
Width: 650  |  Height: 580  |  Size: 315 kB

BIN
cache/bad2/浙A8DW01.png View File

Before After
Width: 650  |  Height: 580  |  Size: 266 kB

BIN
cache/bad2/浙A8NC86.png View File

Before After
Width: 650  |  Height: 580  |  Size: 278 kB

BIN
cache/bad2/浙A908BE.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.6 MB

BIN
cache/bad2/浙A977K7.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.5 MB

BIN
cache/bad2/浙AA9M52.png View File

Before After
Width: 650  |  Height: 580  |  Size: 341 kB

BIN
cache/bad2/浙AAQ185.png View File

Before After
Width: 650  |  Height: 580  |  Size: 308 kB

BIN
cache/bad2/浙AB8Y02.png View File

Before After
Width: 650  |  Height: 580  |  Size: 359 kB

BIN
cache/bad2/浙AE5Z68.png View File

Before After
Width: 650  |  Height: 580  |  Size: 317 kB

BIN
cache/bad2/浙AHD113.png View File

Before After
Width: 650  |  Height: 580  |  Size: 368 kB

BIN
cache/bad2/浙AHH150.png View File

Before After
Width: 650  |  Height: 580  |  Size: 337 kB

BIN
cache/bad2/浙AHV989.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.7 MB

BIN
cache/bad2/浙AJ509M.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.8 MB

BIN
cache/bad2/浙AJ9454.png View File

Before After
Width: 650  |  Height: 580  |  Size: 308 kB

BIN
cache/bad2/浙AL0A26.png View File

Before After
Width: 650  |  Height: 580  |  Size: 352 kB

BIN
cache/bad2/浙AL270V.png View File

Before After
Width: 650  |  Height: 580  |  Size: 302 kB

BIN
cache/bad2/浙AM530Y.png View File

Before After
Width: 650  |  Height: 580  |  Size: 315 kB

BIN
cache/bad2/浙AQ5855.png View File

Before After
Width: 650  |  Height: 580  |  Size: 290 kB

BIN
cache/bad2/浙AQ7007.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 1.4 MB

BIN
cache/bad2/浙ASM539.png View File

Before After
Width: 650  |  Height: 580  |  Size: 318 kB

BIN
cache/bad2/浙AT039E.png View File

Before After
Width: 650  |  Height: 580  |  Size: 335 kB

BIN
cache/bad2/浙AU8B07.png View File

Before After
Width: 650  |  Height: 580  |  Size: 253 kB

BIN
cache/bad2/浙AUE830.png View File

Before After
Width: 650  |  Height: 580  |  Size: 262 kB

BIN
cache/bad2/浙AY3E97.png View File

Before After
Width: 650  |  Height: 580  |  Size: 377 kB

BIN
cache/bad2/浙AY836H.png View File

Before After
Width: 650  |  Height: 580  |  Size: 321 kB

BIN
cache/bad2/浙AZ557H.png View File

Before After
Width: 650  |  Height: 580  |  Size: 288 kB

BIN
cache/bad2/浙AZ6R27.png View File

Before After
Width: 1600  |  Height: 1200  |  Size: 2.0 MB

BIN
cache/bad2/浙CL2J67.png View File

Before After
Width: 650  |  Height: 580  |  Size: 390 kB

BIN
cache/bad2/浙DDD691.png View File

Before After
Width: 650  |  Height: 580  |  Size: 327 kB

BIN
cache/bad2/浙DVE625.png View File

Before After
Width: 650  |  Height: 580  |  Size: 345 kB

BIN
cache/bad2/浙DX0L91.png View File

Before After
Width: 650  |  Height: 580  |  Size: 297 kB

BIN
cache/bad2/浙DX9H10.png View File

Before After
Width: 650  |  Height: 580  |  Size: 355 kB

BIN
cache/bad2/浙E13183.png View File

Before After
Width: 650  |  Height: 580  |  Size: 290 kB

BIN
cache/bad2/浙E19333.png View File

Before After
Width: 650  |  Height: 580  |  Size: 309 kB

BIN
cache/bad2/浙E2230H.png View File

Before After
Width: 650  |  Height: 580  |  Size: 356 kB

BIN
cache/bad2/浙E3489E.png View File

Before After
Width: 650  |  Height: 580  |  Size: 326 kB

BIN
cache/bad2/浙E3679Z.png View File

Before After
Width: 650  |  Height: 580  |  Size: 423 kB

BIN
cache/bad2/浙E37178.png View File

Before After
Width: 650  |  Height: 580  |  Size: 340 kB

BIN
cache/bad2/浙E3899D.png View File

Before After
Width: 650  |  Height: 580  |  Size: 360 kB

BIN
cache/bad2/浙E5183N.png View File

Before After
Width: 650  |  Height: 580  |  Size: 300 kB

BIN
cache/bad2/浙E58556.png View File

Before After
Width: 650  |  Height: 580  |  Size: 297 kB

BIN
cache/bad2/浙E6961E.png View File

Before After
Width: 650  |  Height: 580  |  Size: 378 kB

BIN
cache/bad2/浙E7900H.png View File

Before After
Width: 650  |  Height: 580  |  Size: 320 kB

BIN
cache/bad2/浙E8389Y.png View File

Before After
Width: 650  |  Height: 580  |  Size: 392 kB

BIN
cache/bad2/浙EA3262.png View File

Before After
Width: 650  |  Height: 580  |  Size: 275 kB

BIN
cache/bad2/浙EA5375.png View File

Before After
Width: 650  |  Height: 580  |  Size: 258 kB

BIN
cache/bad2/浙EA6929.png View File

Before After
Width: 650  |  Height: 580  |  Size: 304 kB

BIN
cache/bad2/浙EA7581.png View File

Before After
Width: 650  |  Height: 580  |  Size: 281 kB

BIN
cache/bad2/浙EAD017.png View File

Before After
Width: 650  |  Height: 580  |  Size: 324 kB

BIN
cache/bad2/浙EAS529.png View File

Before After
Width: 650  |  Height: 580  |  Size: 280 kB

BIN
cache/bad2/浙EDD128.png View File

Before After
Width: 650  |  Height: 580  |  Size: 294 kB

BIN
cache/bad2/浙EG0257.png View File

Before After
Width: 650  |  Height: 580  |  Size: 374 kB

BIN
cache/bad2/浙EG6059.png View File

Before After
Width: 650  |  Height: 580  |  Size: 244 kB

BIN
cache/bad2/浙EJ5933.png View File

Before After
Width: 650  |  Height: 580  |  Size: 252 kB

BIN
cache/bad2/浙EK1921.png View File

Before After
Width: 650  |  Height: 580  |  Size: 344 kB

BIN
cache/bad2/浙EK6611.png View File

Before After
Width: 650  |  Height: 580  |  Size: 301 kB

BIN
cache/bad2/浙EL2100.png View File

Before After
Width: 650  |  Height: 580  |  Size: 293 kB

BIN
cache/bad2/浙EL2516.png View File

Before After
Width: 650  |  Height: 580  |  Size: 435 kB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save