AI on the operation of the graphics verification code
Posted: Mon May 08, 2017 2:54 am
				
				Super simple pure PB code, neural network on the application of graphics verification code.
超级简单的纯PB代码,神经网络对图形验证码的应用.

http://120.24.76.95:8090/images/neural_network_01.jpg
Graphic Verification Code Identifies the process and results of training:
图形验证码识别训练的过程和结果:

http://120.24.76.95:8090/images/neural_network_14.jpg

http://120.24.76.95:8090/images/neural_network_15.jpg
完整的源代码包及简单的说明下载:
http://120.24.76.95:8090/neural_network.rar
=========ADD===========
Detailed examples to explain:
详细的实例讲解:
1.http://blog.sina.com.cn/s/blog_4e4522ce0102wrz8.html
2.http://blog.sina.com.cn/s/blog_4e4522ce0102ws1a.html
3.http://blog.sina.com.cn/s/blog_4e4522ce0102ws1o.html
=======================
Simple neural network code:
简易型的神经网络代码:
Add the competency layer to the neural network code:
添加竞争层的神经网络代码:
			超级简单的纯PB代码,神经网络对图形验证码的应用.

http://120.24.76.95:8090/images/neural_network_01.jpg
Graphic Verification Code Identifies the process and results of training:
图形验证码识别训练的过程和结果:

http://120.24.76.95:8090/images/neural_network_14.jpg

http://120.24.76.95:8090/images/neural_network_15.jpg
完整的源代码包及简单的说明下载:
http://120.24.76.95:8090/neural_network.rar
=========ADD===========
Detailed examples to explain:
详细的实例讲解:
1.http://blog.sina.com.cn/s/blog_4e4522ce0102wrz8.html
2.http://blog.sina.com.cn/s/blog_4e4522ce0102ws1a.html
3.http://blog.sina.com.cn/s/blog_4e4522ce0102ws1o.html
=======================
Simple neural network code:
简易型的神经网络代码:
Code: Select all
ForEach _ListImages()
   For Pos = 0 To 3
      *pNumber.__NumberInfo = _ListImages()\Number[Pos]
      For Idx = 0 To #MAI_Number
         Convolue.f = _DimWeight(Idx, 0) * -1
         For c = 0 To #MAI_Matrix-1
            Convolue + _DimWeight(Idx, c+1) * *pNumber\Matrix[c]
         Next 
         OutResult.f = 1/(1+Exp(-Convolue))
         If Idx = *pNumber\Number And OutResult < #MAI_Judged
            AntiConvolue.f = Modulus * (0.90 - OutResult) * Exp(-Convolue)/Sqr(1+Exp(-Convolue))
         ElseIf Idx <> *pNumber\Number And OutResult >= #MAI_Judged 
            AntiConvolue.f = Modulus * (0.10 - OutResult) * Exp(-Convolue)/Sqr(1+Exp(-Convolue))
         Else 
            Continue
         EndIf 
         _DimWeight(Idx, 0) - 01*AntiConvolue
         For c = 0 To #MAI_Matrix-1
            _DimWeight(Idx, c+1) + AntiConvolue * *pNumber\Matrix[c]
         Next
      Next 
   Next 
Next 添加竞争层的神经网络代码:
Code: Select all
ForEach _ListImages()
   For Pos = 0 To 3
      *pNumber.__NumberInfo = _ListImages()\Number[Pos]
      For Idx = 0 To #MAI_Number
         MaxResult.f = 0 : MaxR = -1
         For r = 0 To #MAI_Rotate-1
            DimConvolueW(r) = _DimWeight(Idx, r, 0) * -1
            For c = 0 To #MAI_Matrix-1
                DimConvolueW(r) + _DimWeight(Idx, r, c+1) * *pNumber\Matrix[c]
            Next 
            DimOutResult(r) = 1/(1+Exp(-DimConvolueW(r)))
            If MaxResult < DimOutResult(r) : MaxResult = DimOutResult(r) : MaxR = r : EndIf 
         Next
         
         If Idx = *pNumber\Number And MaxResult < #MAI_Judged
            RFeedback.f = Exp(-DimConvolueW(MaxR))/Sqr(1+Exp(-DimConvolueW(MaxR)))
            AntiConvolue.f = Modulus * (0.90 - DimOutResult(MaxR)) * RFeedback
         ElseIf Idx <> *pNumber\Number And MaxResult >= #MAI_Judged 
            RFeedback.f = Exp(-DimConvolueW(MaxR))/Sqr(1+Exp(-DimConvolueW(MaxR)))
            AntiConvolue.f = Modulus * (0.10 - DimOutResult(MaxR)) * RFeedback
         Else
            Continue
         EndIf   
         _DimWeight(Idx, MaxR, 0) - AntiConvolue
         For c = 0 To #MAI_Matrix-1
            _DimWeight(Idx, MaxR, c+1) + AntiConvolue * *pNumber\Matrix[c]
         Next
      Next 
   Next 
Next