ããã«ã¡ã¯ã ç§ã®ååã¯ã€ãããã»ã€ã«ãã³ã§ããç§ã¯ãŠã©ã«é£éŠå€§åŠã®åŠçã§ãã
ãã®èšäºã§ã¯ãGoogleã®ãã£ããã£ã®èªååãœãªã¥ãŒã·ã§ã³ã§ãããreCAPTCHAãã®äœ¿çšçµéšã«ã€ããŠã話ããããšæããŸãã å·çæç¹ã§ããããã¿ã€ãã¯ã¿ã€ãã«ããèŠããã»ã©å¹ççã«æ©èœããªãããšãèªè
ã«äºåã«èŠåããããšæããŸãããçµæã¯ãå®è£
ãããŠããã¢ãããŒããåé¡ã解決ã§ããããšã瀺ããŠããŸãã
ããããã圌ã®äººçã®ãã¹ãŠã®äººããã£ããã£ã«ééããŸããïŒåçããããã¹ããå
¥åããç°¡åãªè¡šçŸãŸãã¯è€éãªæ¹çšåŒã解ããè»ãæ¶ç«æ ã暪ææ©éãéžæââããŠãã ãã... ãèªåç»é²ããã³æçš¿ã解æãã¢ã«ãŠã³ãã®ã¹ãã ããã³ãã¹ã¯ãŒãéžæãé²ããŸãã
ãHabréãã®ç»é²ãã©ãŒã ã«ã¯ããã®ãããªãã£ããã£ã䜿çšã§ããŸããæ©æ¢°åŠç¿æè¡ã®éçºã«ããããã£ããã£ã®ããã©ãŒãã³ã¹ãå±éºã«ãããããå¯èœæ§ããããŸãã ãã®èšäºã§ã¯ãGoogle reCAPTCHAã§ç»åãæåã§éžæããåé¡ã解決ã§ããããã°ã©ã ã®ããŒãã€ã³ãã«ã€ããŠèª¬æããŸãïŒæ®å¿µãªããããããŸã§ã®ãšããåžžã«ãããšã¯éããŸããïŒã
ãã£ããã£ãååŸããã«ã¯ãå¿
èŠãªãã£ããã£ã¯ã©ã¹ã®æ±ºå®ããªããžã§ã¯ãã®æ€åºãšåé¡ããã£ããã£ã»ã«ã®æ€åºããã£ããã£ã®è§£æ±ºã«ããã人éã®æŽ»åã®ã·ãã¥ã¬ãŒã·ã§ã³ïŒã«ãŒãœã«ã®åããã¯ãªãã¯ïŒãªã©ã®åé¡ã解決ããå¿
èŠããããŸãã
ç»åå
ã®ãªããžã§ã¯ããæ€çŽ¢ããããã«ãã³ã³ãã¥ãŒã¿ãŒã«ããŠã³ããŒãããŠç»åãŸãã¯ãããªå
ã®ãªããžã§ã¯ããèªèããããšãã§ããèšç·Žããããã¥ãŒã©ã«ãããã¯ãŒã¯ã䜿çšãããŸãã ãã ãããã£ããã£ã解決ããã«ã¯ããªããžã§ã¯ããæ€åºããã ãã§ã¯ååã§ã¯ãããŸãããã»ã«ã®äœçœ®ã決å®ããéžæããã»ã«ãèŠã€ããïŒãŸãã¯ã»ã«ããŸã£ããéžæããªãïŒå¿
èŠããããŸãã ããã«ã¯ãã³ã³ãã¥ãŒã¿ãŒããžã§ã³ããŒã«ã䜿çšãããŸãããã®äœæ¥ã§ã¯ããããæåãª
OpenCVã©ã€ãã©ãªã§ãã
ç»åå
ã®ãªããžã§ã¯ããèŠã€ããã«ã¯ããŸãç»åèªäœãå¿
èŠã§ãã ãªããžã§ã¯ããæ€åºããã®ã«ååãªå€§ããã®
PyAutoGUIã¢ãžã¥ãŒã«ã䜿çšããŠãç»é¢ã®äžéšã®ã¹ã¯ãªãŒã³ã·ã§ãããååŸããŸãã ç»é¢ã®æ®ãã®éšåã§ã¯ãããã°ã©ã ããã»ã¹ããããã°ããã³ç£èŠããããã®ãŠã£ã³ããŠã衚瀺ããŸãã
ç©äœæ€åº
ãªããžã§ã¯ãã®æ€åºãšåé¡ã¯ããã¥ãŒã©ã«ãããã¯ãŒã¯ã®æ©èœã§ãã ãã¥ãŒã©ã«ãããã¯ãŒã¯ãæäœã§ããã©ã€ãã©ãªã¯ã
Tensorflow ïŒGoogleãéçºïŒãšåŒã°ããŸãã çŸåšã
ããŸããŸãªããŒã¿ã«å¯ŸããŠéžæã§ãã
ãã¬ãŒãã³ã°æžã¿ã®ã¢ãã«ãå€æ°ãããŸããã€ãŸãããã¹ãŠã®ã¢ãã«ãç°ãªãæ€åºçµæãè¿ãããšãã§ããŸããã€ãŸãããªããžã§ã¯ãã®æ€åºã«åªããã¢ãã«ãšãæªãã¢ãã«ããããŸãã
ãã®èšäºã§ã¯ãssd_mobilenet_v1_cocoã¢ãã«ã䜿çšããŠããŸãã éžæããã¢ãã«ã¯ã
COCOããŒã¿ã»ããã§ãã¬ãŒãã³ã°ãããŸããããã®ããŒã¿ã»ããã§ã¯ã90ã®ç°ãªãã¯ã©ã¹ïŒäººãšè»ããæ¯ãã©ã·ãšæ«ãŸã§ïŒã匷調ãããŠããŸãã çŸåšãåãããŒã¿ã§ãã¬ãŒãã³ã°ãããŠãããããã©ã¡ãŒã¿ãŒãç°ãªãä»ã®ã¢ãã«ããããŸãã ããã«ããã®ã¢ãã«ã«ã¯æé©ãªããã©ãŒãã³ã¹ãšç²ŸåºŠã®ãã©ã¡ãŒã¿ãŒããããããã¯ãã¹ã¯ãããã³ã³ãã¥ãŒã¿ãŒã«ãšã£ãŠéèŠã§ãã ãœãŒã¹ã«ãããšã300 x 300ãã¯ã»ã«ã®1ãã¬ãŒã ã®åŠçæéã¯30ããªç§ã§ãã ãNvidia GeForce GTX TITAN Xãã«ã€ããŠã
ãã¥ãŒã©ã«ãããã¯ãŒã¯ã®çµæã¯ãäžé£ã®é
åã§ãã
- æ€åºããããªããžã§ã¯ãã®ã¯ã©ã¹ã®ãªã¹ãïŒãããã®èå¥åïŒ;
- æ€åºããããªããžã§ã¯ãã®è©äŸ¡ã®ãªã¹ãïŒããŒã»ã³ãïŒ;
- æ€åºããããªããžã§ã¯ãã®åº§æšã®ãªã¹ãïŒãããã¯ã¹ãïŒã
ãããã®é
åã®èŠçŽ ã®ã€ã³ããã¯ã¹ã¯äºãã«å¯Ÿå¿ããŠããŸããã€ãŸãããã£ãŒãã£ã¯ã©ã¹ã®é
åã®3çªç®ã®èŠçŽ ã¯ãæ€åºããããªããžã§ã¯ãã®ãããã¯ã¹ãã®é
åã®3çªç®ã®èŠçŽ ãšãªããžã§ã¯ãè©äŸ¡ã®é
åã®3çªç®ã®èŠçŽ ã«å¯Ÿå¿ããŸãã
éžæããã¢ãã«ã䜿çšãããšã90ã®ã¯ã©ã¹ã®ãªããžã§ã¯ãããªã¢ã«ã¿ã€ã ã§æ€åºã§ããŸãã现èæ€åº
ãOpenCVãã¯ãã
circuits ããšåŒã°ãããšã³ãã£ãã£ãæäœããæ©èœãæäŸããŸãããããã¯ããOpenCVãã©ã€ãã©ãªã®ãfindContoursïŒïŒãé¢æ°ã«ãã£ãŠã®ã¿æ€åºã§ããŸãã ãã®ãããªé¢æ°ã®å
¥åã«ãã€ããªã€ã¡ãŒãžãéä¿¡ããå¿
èŠããããŸããããã¯
ããããå€å€æé¢æ°ã«ãã£ãŠååŸã§ããŸãã
_retval, binImage = cv2.threshold(image,254,255,cv2.THRESH_BINARY) contours = cv2.findContours(binImage, cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)[0]
ãããå€å€æé¢æ°ã®ãã©ã¡ãŒã¿ãŒã®æ¥µå€ãèšå®ãããšãããŸããŸãªçš®é¡ã®ãã€ãºãé€å»ãããŸãã ãŸããäžå¿
èŠãªå°ããªèŠçŽ ãšãã€ãºã®éãæå°éã«æããããã«ã䟵é£ïŒå§çž®ïŒããã³ãã«ãã¢ããïŒæ¡åŒµïŒé¢æ°ã®
圢æ
å€æãé©çšã§ããŸãã ãããã®é¢æ°ãOpenCVã®äžéšã§ãã å€æåŸãé ç¹ã®æ°ã4ã§ãã茪éãéžæãããŸãïŒä»¥åã«èŒªéã«å¯ŸããŠ
è¿äŒŒé¢æ°ãå®è¡ããïŒã
æåã®ãŠã£ã³ããŠã§ã¯ããããå€å€æã®çµæã 2çªç®ã¯ã圢æ
åŠçå€æã®äŸã§ãã 3çªç®ã®ãŠã£ã³ããŠã§ã¯ãã»ã«ãšãã£ããã£ãã£ããããã§ã«éžæãããŠããŸããããã°ã©ã ã§è²ã§åŒ·èª¿è¡šç€ºãããŸãããã¹ãŠã®å€æåŸãã»ã«ã§ã¯ãªãçé«ç·ã¯ãã»ã«ãå«ãæçµçãªé
åã«ãªããŸãã äžèŠãªãã€ãºãé€å»ããããã«ãé·ãïŒåšå²ïŒãšèŒªéã®é¢ç©ã®å€ã«åŸã£ãŠéžæããŸãã
察象ã®åè·¯ã®å€ã360ã900ãŠãããã®ç¯å²ã«ããããšãå®éšçã«æããã«ãªããŸããã ãã®å€ã¯ãç»é¢äžã§15.6ã€ã³ãã®å¯Ÿè§ç·ãš1366 x 768ãã¯ã»ã«ã®è§£å床ã§éžæãããŸãã ããã«ã衚瀺ããã茪éã®å€ã¯ããŠãŒã¶ãŒã®ç»é¢ã®ãµã€ãºã«å¿ããŠèšç®ã§ããŸãããäœæããããããã¿ã€ãã«ã¯ãã®ãããªãªã³ã¯ã¯ãããŸããã
ã»ã«ãæ€åºããããã«éžæããã¢ãããŒãã®äž»ãªå©ç¹ã¯ãã°ãªãããã©ã®ããã«è¡šç€ºããããããã£ããã£ããŒãžã«è¡šç€ºãããã»ã«ã®æ°ïŒ8ã9ããŸãã¯16ïŒãæ°ã«ããªãããšã§ãã
ãã®ç»åã¯ãããŸããŸãªãã£ããã£ã°ãªããã瀺ããŠããŸãã ã»ã«éã®è·é¢ãç°ãªãããšã«æ³šæããŠãã ããã ã»ã«ãäºãã«åé¢ãããšã圢æ
åŠçå§çž®ãå¯èœã«ãªããŸãã茪éãæ€åºãããã1ã€ã®å©ç¹ã¯ãOpenCVã§äžå¿ãæ€åºã§ããããšã§ãïŒç§»åãšããŠã¹ã¯ãªãã¯ã®åº§æšã決å®ããããã«äžå¿ãå¿
èŠã§ãïŒã
éžæããã»ã«ãéžæãã
äžèŠãªãã€ãºåè·¯ã®ãªãCAPTCHAã»ã«ã®ããããªèŒªéãæã€é
åã䜿çšããŠãåCAPTCHAã»ã«ïŒçšèªãOpenCVãã®ãåè·¯ãïŒã埪ç°ããããã¥ãŒã©ã«ãããã¯ãŒã¯ããåä¿¡ãããªããžã§ã¯ãã®æ€åºããããããã¯ã¹ããšäº€å·®ããäºå®ã確èªã§ããŸãã
ãã®äºå®ã確ç«ããããã«ãã»ã«ã«é¡äŒŒããåè·¯ã§æ€åºããããããã¯ã¹ãã®ç¿»èš³ã䜿çšããŸããã ãããããªããžã§ã¯ããã»ã«å
ã«ããå Žåã¯äº€å·®ç¹ãšèŠãªãããªãããããã®ã¢ãããŒãã¯ééã£ãŠããããšãå€æããŸããã åœç¶ããã®ãããªçŽ°èã¯ãã£ããã£ã§ç®ç«ã¡ãŸããã§ããã
ãã®åé¡ã¯ãé»ãã»ã«ã«åã»ã«ïŒçœãå¡ãã€ã¶ãïŒã®èŒªéãåæç»ããããšã§è§£æ±ºããŸããã åæ§ã«ããªããžã§ã¯ããå«ããã¬ãŒã ã®ãã€ããªç»åãååŸãããŸããã åé¡ãçºçããŸã-ã»ã«ãšãªããžã§ã¯ãã®åœ±ä»ããã¬ãŒã ã®äº€å·®ã®äºå®ãã©ã®ããã«ç¢ºç«ããã®ã§ããïŒ ã»ã«ãå«ãé
åã®åå埩ã§ã¯ã2ã€ã®ãã€ããªã€ã¡ãŒãžã«å¯ŸããŠè«çåæŒç®ïŒè«çORïŒãå®è¡ãããŸãã ãã®çµæã亀差ããé åã匷調衚瀺ãããæ°ãããã€ããªã€ã¡ãŒãžãåŸãããŸãã ã€ãŸãããã®ãããªé åãããå Žåãã»ã«ãšãªããžã§ã¯ãã®ãã¬ãŒã ã亀差ããŸãã ããã°ã©ã ã§ã¯ããã®ãããªãã§ãã¯ã¯ã
.anyïŒïŒ ãã¡ãœããã䜿çšããŠå®è¡ã§ããŸããé
åã«1ã€ä»¥äžã®èŠçŽ ã1ã€ã§ãããå Žåã¯ãTrueãããŠãããããªãå Žåã¯ãFalseããè¿ããŸãã
ãã®å Žåã®ãè«çORãã€ã¡ãŒãžã®ãanyïŒïŒãé¢æ°ã¯trueãè¿ããããæ€åºããããªããžã§ã¯ãã®ãã¬ãŒã é åãšã»ã«ã®äº€å·®ã®äºå®ã確ç«ããŸããéå¶ç®¡ç
ãPythonãã®ã«ãŒãœã«ã³ã³ãããŒã«ã¯ããwin32apiãã¢ãžã¥ãŒã«ã®ãããã§å©çšå¯èœã«ãªããŸããïŒãã ãããããžã§ã¯ãã«æ¢ã«ã€ã³ããŒããããŠãããPyAutoGUIãããã®æ¹æ³ãç¥ã£ãŠããããšãå€æããŸããïŒã ããŠã¹ã®å·Šãã¿ã³ãæŒããŠé¢ãããšãããã³ã«ãŒãœã«ãç®çã®åº§æšã«ç§»åããããšã¯ãwin32apiã¢ãžã¥ãŒã«ã®å¯Ÿå¿ããæ©èœã«ãã£ãŠå®è¡ãããŸãã ãããããããã¿ã€ãã§ã¯ãã«ãŒãœã«ã®åããèŠèŠçã«èŠ³å¯ã§ããããã«ããŠãŒã¶ãŒå®çŸ©é¢æ°ã§ã©ãããããŠããŸããã ããã¯ããã©ãŒãã³ã¹ã«æªåœ±é¿ãåãŒãããã¢ã³ã¹ãã¬ãŒã·ã§ã³ã®ã¿ã®ããã«å®è£
ãããŸããã
éçºããã»ã¹äžã«ãã©ã³ãã ãªé åºã§ã»ã«ãéžæãããšããã¢ã€ãã¢ãçãŸããŸããã ããã¯å®çšçãªæå³ããªããªãå¯èœæ§ããããŸãïŒæãããªçç±ã«ãããGoogleã¯ãã£ããã£æäœã®ã¡ã«ããºã ã®ã³ã¡ã³ããšèª¬æãæäŸããŸããïŒããã»ã«ãç¡ç§©åºã«ã«ãŒãœã«ã移åããããšã¯ãã楜ããèŠããŸãã
ã¢ãã¡ãŒã·ã§ã³ã§ã¯ãçµæã¯ãrandom.shuffleïŒboxesForSelectïŒãã§ããããã¹ãèªè
䜿çšå¯èœãªãã¹ãŠã®éçºã1ã€ã®å
šäœã«çµåããã«ã¯ããã1ã€ã®ãªã³ã¯ãå¿
èŠã§ãããã£ããã£ããèŠæ±ãããã¯ã©ã¹ã®èªèåäœã§ãã ç»åå
ã®ããŸããŸãªãªããžã§ã¯ããèªèããŠåºå¥ããæ¹æ³ã¯æ¢ã«ç¥ã£ãŠããŸããä»»æã®ãã£ããã£ã»ã«ãã¯ãªãã¯ã§ããŸãããã¯ãªãã¯ããã»ã«ã¯ããããŸããã ãã®åé¡ã解決ããæ¹æ³ã®1ã€ã¯ããã£ããã£ã®èŠåºãããããã¹ããèªèããããšã§ãã ãŸããå
åŠåŒæåèªèããŒã«ã
Tesseract-OCR ãã䜿çšããŠããã¹ãèªèãå®è£
ããããšããŸããã
ææ°ããŒãžã§ã³ã§ã¯ãã€ã³ã¹ããŒã©ãŒãŠã£ã³ããŠã«èšèªããã¯ãçŽæ¥ã€ã³ã¹ããŒã«ããããšãã§ããŸãïŒä»¥åã¯ããã¯æåã§è¡ãããŠããŸããïŒã Tesseract-OCRãã€ã³ã¹ããŒã«ããŠãããžã§ã¯ãã«ã€ã³ããŒãããåŸããã£ããã£ããããŒã®ããã¹ããèªèããããšããŸããã
æ®å¿µãªããšã«ããã®çµââæã¯ãŸã£ããå°è±¡çã§ã¯ãããŸããã§ããã ããããŒå
ã®ããã¹ãã倪åã§åŒ·èª¿è¡šç€ºããŠçµåããããšã決ããã®ã§ãç»åã«ããŸããŸãªå€æãé©çšããããšããŸããïŒäºå€åãçž®å°ãæ¡å€§ããŒãããæªã¿ããµã€ãºå€æŽæäœã æ®å¿µãªãããããã¯è¯ãçµæãäžããŸããã§ããïŒæè¯ã®å Žåãã¯ã©ã¹ã®æåã®äžéšã®ã¿ã決å®ãããçµæãæºè¶³ã®ãããã®ã§ãã£ãå Žåãåãå€æãé©çšããŸããããä»ã®å€§æåïŒããã¹ããç°ãªãïŒã«é©çšãããšãçµæã¯åã³æªããªããŸããã
Tesseract-OCRãã£ããã®èªèã¯ãéåžžãäžæºè¶³ãªçµæããããããŸããããTesseract-OCRãã¯ããã¹ããé©åã«èªèããªããšæ確ã«èšãããšã¯äžå¯èœã§ãããããã§ã¯ãããŸãããããŒã«ã¯ä»ã®ç»åïŒãã£ããã£ãã£ããã§ã¯ãªãïŒãã¯ããã«ããåŠçããŸãã
APIãç¡æã§äœ¿çšããããã®APIãæäŸãããµãŒãããŒãã£ãµãŒãã¹ã䜿çšããããšã«ããŸããïŒé»åã¡ãŒã«ã¢ãã¬ã¹ãžã®ããŒã®ç»é²ãšåä¿¡ãå¿
èŠã§ãïŒã ãã®ãµãŒãã¹ã«ã¯1æ¥ããã500åã®èªèãšããå¶éããããŸãããéçºæéå
šäœãéããŠãå¶éã«é¢ããåé¡ã¯çºçããŠããŸããã ããã©ãããïŒããããŒã®å
ã®ç»åããµãŒãã¹ã«ïŒçµ¶å¯Ÿã«å€æãé©çšããã«ïŒæåºããŸãããããã®çµæã¯å¬ããæããŸããã
ãµãŒãã¹ããã®åèªã¯ãã»ãšãã©ãšã©ãŒãªãã§è¿ãããŸããïŒéåžžãå°ããªæŽ»åã§æžããããã®ã§ãïŒã ããã«ããããã¯éåžžã«äŸ¿å©ãªåœ¢åŒã§è¿ãããŸãã-æ¹è¡æåã§è¡ããšã«åå²ãããŠããŸãã ãã¹ãŠã®ç»åã§ã2è¡ç®ã ãã«èå³ããã£ãã®ã§ãçŽæ¥ã¢ã¯ã»ã¹ããŸããã ãã®ãããªåœ¢åŒã«ãããè¡ãæºåããå¿
èŠããªããªã£ããããããã¯åã°ãããã®ã§ãããããã¹ãå
šäœã®å
é ãŸãã¯æ«å°Ÿãã«ãããããããªã ãã眮æãæ£èŠè¡šçŸã®æäœã1è¡ã®åŒ·èª¿è¡šç€ºãç®çãšããä»ã®æäœãå®è¡ããå¿
èŠã¯ãããŸããã§ããïŒæã«ã¯2ã€ïŒïŒ-çŽ æµãªããŒãã¹ïŒ
text = serviceResponse['ParsedResults'][0]['ParsedText']
ããã¹ããèªèãããµãŒãã¹ã¯ãã¯ã©ã¹åãã»ãšãã©ééããŸããã§ãããããšã©ãŒã®å¯èœæ§ã®ããã«ã¯ã©ã¹åã®äžéšãæ®ãããšã«ããŸããã ããã¯ãªãã·ã§ã³ã§ããããTesseract-OCRããåèªã®çµãããéäžããééã£ãŠèªèããŠããå ŽåããããŸããã ããã«ããã®ã¢ãããŒãã¯ãé·ãã¯ã©ã¹åãŸãã¯2èªã®ååã®å Žåã®ã¢ããªã±ãŒã·ã§ã³ãšã©ãŒãæé€ããŸãïŒãã®å ŽåããµãŒãã¹ã¯3è¡ã§ã¯ãªã4è¡ãè¿ãã2è¡ç®ã«å®å
šãªã¯ã©ã¹åãšã³ããªãèŠã€ãããŸããïŒã
ãµãŒãããŒãã£ã®ãµãŒãã¹ã¯ãç»åãå€æããããšãªãã¯ã©ã¹åãèªèããŸããå䜵
ããããŒããããã¹ããååŸããã ãã§ã¯äžååã§ãã 䜿çšå¯èœãªã¢ãã«ã¯ã©ã¹ã®èå¥åãšæ¯èŒããå¿
èŠããããŸããã¯ã©ã¹ã®é
åã§ã¯ããã¥ãŒã©ã«ãããã¯ãŒã¯ããååã§ã¯ãªãã¯ã©ã¹èå¥åãæ£ç¢ºã«è¿ãããã§ãã ã¢ãã«ããã¬ãŒãã³ã°ããå ŽåãååãšããŠãã¯ã©ã¹åãšãã®èå¥åãæ¯èŒããããã¡ã€ã«ãäœæãããŸãïŒå¥åãã©ãã«ããããïŒã captchaã¯ãŸã ãã·ã¢èªã®ã¯ã©ã¹ãå¿
èŠãšããããïŒããã¯å€æŽã§ããŸãïŒãç§ã¯ãããç°¡åã«ããã¯ã©ã¹èå¥åãæåã§æå®ããããšã«ããŸããïŒ
if "" in query:
äžèšã®ãã¹ãŠãããã°ã©ã ã®ã¡ã€ã³ãµã€ã¯ã«ã§åçŸãããŸãããªããžã§ã¯ãã®ãã¬ãŒã ã¯ãŒã¯ãã»ã«ããããã®äº€å·®ã決å®ãããã«ãŒãœã«ã移åããŠã¯ãªãã¯ãããŸãã åžœåãæ€åºããããšãããã¹ãèªèãå®è¡ãããŸãã ãã¥ãŒã©ã«ãããã¯ãŒã¯ãå¿
èŠãªã¯ã©ã¹ãæ€åºã§ããªãå Žåãç»åã®ä»»æã®ã·ãããæ倧5åå®è¡ããïŒã€ãŸãããã¥ãŒã©ã«ãããã¯ãŒã¯ãžã®å
¥åãå€æŽãããŸãïŒãæ€åºããŸã è¡ãããªãå Žåã¯ããã¹ããã/確èªããã¿ã³ãã¯ãªãã¯ãããŸãïŒãã®äœçœ®ãåæ§ã«æ€åºãããŸãïŒã»ã«ãšãã£ããã®æ€åºïŒã
ãã£ããã£ãé »ç¹ã«è§£æ±ºããå Žåãéžæããã»ã«ãæ¶ãããã®å Žæã«æ°ããã»ã«ããã£ãããšè¡šç€ºããããšãã«ç»åã芳å¯ã§ããŸãã ãããã¿ã€ãã¯ãã¹ãŠã®ã»ã«ãéžæãããšããã«æ¬¡ã®ããŒãžã«ç§»åããããã«ããã°ã©ã ãããŠããããããã£ãããšè¡šç€ºãããã»ã«ã§ãªããžã§ã¯ããæ€åºããã«ã次ãžããã¿ã³ã®ã¯ãªãã¯ãé€å€ããããã«3ç§äŒæ¢ããããšã«ããŸããã
æãéèŠãªããšãã€ãŸããã£ããã£ãæ£åžžã«å®äºããããã®ãã§ãã¯ããŒã¯ã®èª¬æãå«ãŸããŠããªãå Žåããã®èšäºã¯å®å
šã§ã¯ãããŸããã åçŽãª
ãã³ãã¬ãŒãæ¯èŒã§ãããã§ãããšå€æããŸããã ãã¿ãŒã³ãããã³ã°ããªããžã§ã¯ããæ€åºããæè¯ã®æ¹æ³ãšã¯ã»ã©é ãããšã¯æ³šç®ã«å€ããŸãã ããšãã°ãæ€åºæ床ãã0.01ãã«èšå®ããŠãé¢æ°ã§ãã¹ãŠã®ãã£ãã¯ã®è¡šç€ºãåæ¢ããå¿
èŠããããŸããããå®éã«ãã£ãã¯ãããå Žåã¯ããã衚瀺ããŸããã åæ§ã«ããŠãŒã¶ãŒã«å¯Ÿå¿ãããã£ããã£ãéå§ãã空ã®ãã§ãã¯ããã¯ã¹ã䜿çšããŠè¡åããŸããïŒæ床ã«åé¡ã¯ãããŸããã§ããïŒã
çµæ
説æãããã¹ãŠã®ã¢ã¯ã·ã§ã³ã®çµæã¯ãã
ããŒã¹ã¿ãŒ ãã§ããã©ãŒãã³ã¹ããã¹ãããã¢ããªã±ãŒã·ã§ã³ã§ãã
ã¢ãã«ã«ãªãã¯ã©ã¹ïŒæšªææ©éãé段ãåºã®çªãªã©ïŒãéžæããå¿
èŠã«ãã°ãã°çŽé¢ããããããããªã¯æåã®è©Šã¿ã§æ®åœ±ãããªãã£ãããšãèªèãã䟡å€ããããŸãã
ãGoogle reCAPTCHAãã¯ç¹å®ã®å€ããµã€ãã«è¿ãããããããã§ãããããšã瀺ãããµã€ã管çè
ã¯ãã®å€ãæž¡ãããã®ãããå€ãèšå®ã§ããŸãã ããŒã¹ã¿ãŒã§æ¯èŒçäœããã£ããã£ãããå€ãèšå®ãããå¯èœæ§ããããŸãã ããã¯ã2åééãããšããäºå®ã«ãããããããããã°ã©ã ã«ãããã£ããã£ã®ç°¡åãªééã説æããŸãããã£ããã£ã®æåã®ããŒãžã®ä¿¡å·ãš4çªç®ã®ããŒãžã®æ¶ç«æ ã¯èŠããŸããã
ããŒã¹ã¿ãŒã«å ããŠãå
¬åŒã®
reCAPTCHAãã¢ããŒãžã§å®éšãè¡ãããŸããã ãã®çµæãè€æ°ã®èª€ã£ãæ€åºïŒããã³éçºèŠïŒã®åŸã人ã«ãšã£ãŠããã£ããã£ããã£ããã£ããããšã¯éåžžã«é£ãããªããŸãïŒãã©ã¯ã¿ãŒãã€ã·ã®æšãªã©ã®æ°ããã¯ã©ã¹ãå¿
èŠã§ããããªããžã§ã¯ãã®ãªãã»ã«ããµã³ãã«ã«è¡šç€ºããïŒã»ãŒå調ãªè²ïŒãããŒãžæ°ãåçã«å¢å ããééããã
ããã¯ããªããžã§ã¯ããæ€åºãããªãå ŽåïŒã¢ãã«ã«ååšããªãããïŒã©ã³ãã ãªã»ã«ãã¯ãªãã¯ããããšã決å®ãããšãã«ç¹ã«é¡èã§ããã ãããã£ãŠãã©ã³ãã ãªã¯ãªãã¯ãåé¡ã®è§£æ±ºã«ã€ãªãããªãããšã¯ç¢ºãã§ãã 審æ»å®ã«ãããã®ãããªããããã¯ããåãé€ãããã«ãã€ã³ã¿ãŒãããæ¥ç¶ãåæ¥ç¶ãããã©ãŠã¶ããŒã¿ãã¯ãªã¢ããŸããããã®ãããªãã¹ãã«åæ Œããããšãäžå¯èœã«ãªã£ãããã§ãã
ããªãã®äººéæ§ãçããªãããã®ãããªçµæã¯å¯èœã§ããéçº
èšäºãšã¢ããªã±ãŒã·ã§ã³ãèªè
ã®èå³ãããããªãã°ãç§ã¯åãã§ãã®å®è£
ããã¹ããããã³ãã詳现ãªåœ¢åŒã§ã®ãããªã説æãç¶ããŸãã
çŸåšã®ãããã¯ãŒã¯ã®äžéšã§ã¯ãªãã¯ã©ã¹ãèŠã€ããããšã§ããããã«ãããã¢ããªã±ãŒã·ã§ã³ã®å¹çã倧å¹
ã«åäžããŸãã çŸæç¹ã§ã¯ãå°ãªããšã暪ææ©éãã·ã§ãŒãŠã£ã³ããŠãç
çªãªã©ã®ã¯ã©ã¹ãèªèããå¿
èŠããããŸããã¢ãã«ãåèšç·Žããæ¹æ³ã説æããŸãã éçºäžã«ãæãäžè¬çãªã¯ã©ã¹ã®çããªã¹ããäœæããŸããã
- 暪ææ©é;
- æ¶ç«æ ;
- åºã®çª
- ç
çª;
- è»;
- ãã¹
- ä¿¡å·æ©;
- èªè»¢è»
- 茞éæ段;
- é段
- ãµã€ã³ã
ãªããžã§ã¯ãæ€åºã®å質ãåäžãããã«ã¯ãåæã«è€æ°ã®ã¢ãã«ã䜿çšããŸããããã«ãããããã©ãŒãã³ã¹ã¯äœäžããŸããã粟床ã¯åäžããŸãã
ãªããžã§ã¯ããæ€åºããå質ãåäžãããå¥ã®æ¹æ³ã¯ããã¥ãŒã©ã«ãããã¯ãŒã¯ãžã®ç»åå
¥åãå€æŽããããšã§ãïŒãããªã§ã¯ããªããžã§ã¯ããæ€åºãããªããšãã«ãä»»æã®ç»åã·ãããæ°åïŒæ°Žå¹³ããã³åçŽ10ãã¯ã»ã«ä»¥å
ïŒå®è¡ããå€ãã®å Žåããã®æäœã«ããã以åã«ãã£ããªããžã§ã¯ããèŠãããšãã§ããŸãæ€åºãããŸããã§ããã
ç»åãå°ããªæ£æ¹åœ¢ãã倧ããªæ£æ¹åœ¢ïŒæ倧300 x 300ãã¯ã»ã«ïŒã«å¢ãããšãæ€åºãããªããªããžã§ã¯ããæ€åºãããŸãã
å·ŠåŽã«ãªããžã§ã¯ãã¯èŠã€ãããŸããã§ãããå
ã®æ£æ¹åœ¢ã¯100ãã¯ã»ã«ã§ãã å³åŽã§ã¯ããã¹ãæ€åºãããŠããŸããæ倧300 x 300ãã¯ã»ã«ã®æ¡å€§ãããæ£æ¹åœ¢ã§ãããã1ã€ã®èå³æ·±ãå€æã¯ãOpenCVããŒã«ã䜿çšããç»åäžã®çœãã°ãªããã®åé€ã§ãããã®çç±ã§æ¶ç«æ ããããªã§æ€åºãããªãã£ãå¯èœæ§ããããŸãïŒãã®ã¯ã©ã¹ã¯ãã¥ãŒã©ã«ãããã¯ãŒã¯ã«ååšããŸãïŒã
å·ŠåŽã¯å
ã®ç»åãå³åŽã¯ã°ã©ãã£ãã¯ãšãã£ã¿ã§å€æŽãããç»åã§ããã°ãªãããåé€ãããã»ã«ãçžäºã«ç§»åããŸãããŸãšã
ãã®èšäºã§ã¯ãcaptchaã¯ãããããããã«å¯Ÿããæåã®ä¿è·ã§ã¯ãªãããšãäŒããããšæããŸãããè¿ãå°æ¥ãèªåã·ã¹ãã ã«å¯Ÿããæ°ããä¿è·æ段ãå¿
èŠã«ãªãå¯èœæ§ãéåžžã«é«ãã§ãã
éçºããããããã¿ã€ãã¯ãäžå®å
šãªç¶æ
ã§ãã£ãŠãããã¥ãŒã©ã«ãããã¯ãŒã¯ã¢ãã«ã®å¿
èŠãªã¯ã©ã¹ãšç»åã«å€æãé©çšããããšã§ãèªååãã¹ãã§ãªãããã»ã¹ã®èªååãå®çŸã§ããããšã瀺ããŠããŸãã
ãŸãããã®èšäºã§èª¬æãããã£ããã£ãåé¿ããæ¹æ³ã«å ããŠããªãŒãã£ãªãµã³ãã«ã
転åãã
å¥ã®æ¹æ³ããããšããäºå®ã«Googleã®æ³šæãåèµ·ããããšæããŸãã ç§ã®æèŠã§ã¯ãããããã«å¯ŸãããœãããŠã§ã¢è£œåãšã¢ã«ãŽãªãºã ã®å質åäžã«é¢é£ãã察çãè¬ããå¿
èŠããããŸãã
çŽ æã®å
容ãšæ¬è³ªããããGoogleããç¹ã«ãreCAPTCHAãã奜ãã§ã¯ãªãããã«æãããããããŸããããããã¯äºå®ãšã¯ã»ã©é ããã®ã§ã次ã®å®è£
ãããå Žåã¯ããã®çç±ãã話ããŸãã
æè²ãæ¹åããæ
å ±ã»ãã¥ãªãã£ã確ä¿ããããã®æ¹æ³ãæ¹åããããã«éçºããã³å®èšŒãããŸããã
ãæž
èŽããããšãããããŸããã