World & AI Data Challenge: Erste Schritte mit der Braille-Erkennung

Künstliche Intelligenz und Datenanalysetechnologien dringen immer schneller in unser Leben ein und können eine weitere Chance bieten, soziale Probleme zu lösen, die für Menschen, die zuvor noch nicht implementiert wurden, wirklich wichtig sind. Zu diesem Zweck organisierte das ASI Digital Development Center den World AI & Data Challenge-Wettbewerb , dessen Ziel es ist, den Prozess der Suche nach sozialen Problemen und deren Lösungen zu strukturieren. Im Februar 2020 lud mich das Team des ASI Digital Development Center ein, mich den Experten dieses Wettbewerbs anzuschließen. In diesem Beitrag werde ich Ihnen ein wenig über den Wettbewerb selbst erzählen und darüber, wie Sie eine der interessanten Aufgaben dieses Wettbewerbs lösen können - die Braille- Erkennung . Sie können bis zum 31. August 2020 an der Lösung dieser und anderer Aufgaben des Wettbewerbs teilnehmen .





Über den Wettbewerb



, . .



, , . , , . 147 43 , , , . 30 30 , 8 — .



, . 2 . : - , - - , . . — http://git.asi.ru 31 2020 ..



( — 2021 .), . . .



, 1,5 . , 1 Data Science -.





. , , , .



, :



  • ,
  • ,


— , .





, , . , 2017 , GitHub, , — Python ( , , - ). , , . !



, . : Smart Braille System Recognizer (2013), Optical Braille Recognition Based on Semantic Segmentation Network.



, . - , tutorial





, , . , :



Cyryllische Buchstaben in Blindenschrift



, .



, , - :



  • [ Kaggle][KaggleData], , , . .
  • GitHub , , data augmentation.
  • , . , , .. , , ..


Kyrillische Buchstaben in Blindenschrift





, :



  1. /
  2. , ( )
  3. ,
  4. . , , spell checker, , Microsoft.


. , , GitHub https://github.com/shwars/braillehack. — fork! Visual Studio Codespaces





OpenCV. , - :



im = cv2.imread('../data/Photo_Turlom_C1_2.jpeg')
im = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY)




, . , , . : — .



, :



im = cv2.blur(im,(3,3))
im = cv2.adaptiveThreshold(im, 255, cv2.ADAPTIVE_THRESH_MEAN_C,
                           cv2.THRESH_BINARY_INV, 5, 4)
im = cv2.medianBlur(im, 3)
_,im = cv2.threshold(im, 0, 255, cv2.THRESH_OTSU)
im = cv2.GaussianBlur(im, (3,3), 0)
_,im = cv2.threshold(im, 0, 255, cv2.THRESH_OTSU)
plt.imshow(im)


:







, , .



.



. feature detectors, OpenCV ORB, :



orb = cv2.ORB_create(5000)
f,d = orb.detectAndCompute(im,None)


5000 — , . , :



def plot_dots(im,dots):
    img = np.zeros_like(im)
    for x in dots:
        cv2.circle(img,(int(x[0]),int(x[1])),1,(255,0,0))
    plt.imshow(img)

pts = [x.pt for x in f]
plot_dots(cim,pts)  






, :



  • . , . , , .
  • .


feature detector , .

: OR- , . , — , .



, ! , - !





, , , ( ) . , . , , . "" , , :



min_x, min_y, max_x, max_y = \
   [int(f([z[i] for z in pts])) 
       for f in (min,max) for i in (0,1)]


(, 500):



off = 5
src_pts = np.array([(min_x-off,min_y-off),(min_x-off,max_y+off),
                    (max_x+off,min_y-off),(max_x+off,max_y+off)])
dim = 500
dst_pts = np.array([(0,0),(0,dim),(dim,0),(dim,dim)])
h,m = cv2.findHomography(src_pts,dst_pts)
trim = cv2.warpPerspective(cim,h,(dim,dim))
plt.imshow(trim)




.





, , .



char_h = 32
char_w = 22
def slice(img):
    dy,dx = img.shape
    y = 0
    while y+char_h<dy:
        x=0
        while x+char_w<dx:
            #    x
            while np.max(img[y:y+char_h,x])!=0:
                x+=1
            while np.max(img[y:y+char_h,x+char_w])!=0:
                x-=1
            #    
            if np.max(img[y:y+char_h,x:x+char_w])>0:
                yield img[y:y+char_h,x:x+char_w]
            x+=char_w
        y+=char_h

sliced = list(slice(trim))


. - , , "" . , - , x. .



, :







, , MNIST, , :



  • Keras/Tensorflow —
  • , PyTorch — , .




, . - , . , - , .



, . , , , . ,

Microsoft, REST-. MVP .





( Python), . , , . (MVP), Microsoft Azure .



:





Python , REST-. -API, . API Azure Function HTTP-.



Azure Function — - ( Python), - ( — REST-). , Python — .



- . !





, , , MVP-. , , .



, , http://github.com/shwars/braillehack. , , " " — , . , - — , http://soshnikov.com.



! , - , , , - .




All Articles