çµµæåãé¢çœãçŸè±¡ã ãšæããŸããïŒ
å å²æ代ãç§ããŸã å°åŠçã§ãã€ã³ã¿ãŒãããã®æ¥œãããç解ãå§ããã°ããã®ãšããICQã«è¿œå ãããæåã®é£çµ¡å ãããé¡æåã¯æ¯æ¥ç§ã楜ããŸããŸããã
ãã以æ¥ãããããã®æ°ŽãæµããŸããããç§ã¯æçããŠããŸãããæã ãç§ã«éãããçµµæåã«åŸ®ç¬ãç¶ããç°ãªããµã€ãºã®ç®ã§éä¿¡è ãè¡šçŸããããé¡å šäœã«æããªç¬ã¿ãæµ®ãã¹ãŸãã ãããããã¹ãŠãããã»ã©æªãããã§ã¯ãããŸãããäžæ¹ã§ãç§ã¯ããŒã¿åæãšæ©æ¢°åŠç¿ã®éçºè ããã³å°é家ã«ãªããŸããïŒ ããã§ãæšå¹Žãç§ã®æ°ããé¢å¿ã¯ãæ¯èŒçæ°ããããèå³æ·±ãåºæ¿çãªæ³ååã深局åŠç¿æè¡ã«æ¹ãããŸããã å°çäžã§äœçŸäººãã®æãè³¢ãç§åŠè ãšæãã¯ãŒã«ãªãšã³ãžãã¢ãé·å¹Žãã®åé¡ã«åãçµãã§ããŸããããä»ã§ã¯ãæçµçã«ããã£ãŒããã¥ãŒã©ã«ãããã¯ãŒã¯ãæããããšã¯ãéåžžã®ååž°ãæšè£œã¢ã³ãµã³ãã«ãªã©ã®ãå€å žçãªãæ¹æ³ã»ã©é£ãããããŸããã ãããŠãçµµæåã«ã€ããŠæãåºããŸããïŒ
çµµæåãéä¿¡ãããšãæ¬åœã«é¡ãäœãããšãã§ãããšæ³åããŠãã ããã ããã¯çŽ æŽããããã£ãŒãã©ãŒãã³ã°ã®ç·Žç¿ã§ãããç§ã¯æ±ºæããä»äºã«åãæãããŸããã
ã¬ã¬ãŒãžãã£ãŒãã©ãŒãã³ã°-ãã§ããŒã·ãã
ã¬ã¬ãŒãžãã£ãŒãã©ãŒãã³ã°-2ã€ã®ãããã¯ãŒã¯
ã¬ã¬ãŒãžã§ã®æ·±å±€åŠç¿-ç¬é¡ã®åŸ©æŽ»
æçš¿å šäœãéãã人ãã¡ã¯ã倱æããªãããã«ããã€ã³ã¿ãŒãããäžã®ç¡æ°ã®æçš¿ã®ã¹ããŒãªãŒã©ã€ã³ãç¹°ãè¿ããªãããã«ããŸããããã¯èšäºããå®æããã¢ãã«ãåãã倧éã®ããŒã¿ããããã¯ãŒã¯ã«æ³šããéæ³ã®ããã«ãã¹ãŠãå€æããŸãã ç§ã¯ãã®åé¡ã«ãã£ãšç³»çµ±çã«ã¢ãããŒãããå€ãã®å®éšãè¡ããçµæã詳现ã«ç 究ããåççãªçµè«ãåºãããšããŸããïŒãããåžæïŒïŒçµè«ã ããã«ãçµæãšããŠãå®éã®çç£ã§äœ¿çšããæºåãã§ããŠããªãã¢ãã«ãååŸããã«ã¯ãå°ãªããšãæŠå¿µçã«ã¯ãç解å¯èœãªãšã³ãžãã¢ãªã³ã°åªåãé©çšããŠãªã¢ã«ã¿ã€ã ã§äœæ¥ããããšãã§ããŸãã
ç§ã®è©±ã¯ãæã®æ³¢ãšç°¡åãªã¹ã¯ãªããã®ç«ã¡äžãã§é©ãã»ã©ã®çµæãåŸããããšããããšã話ã§ã¯ãããŸããã ããã¯ãçŸä»£ã®èšäºãããã§ã¯ãªãèšäºãç¡æ°ã®å®éšã®é·ãç 究ã«ãã£ãŠãã£ãããšç¢ºå®ã«å æãããé£ç¶ãã倱æã®ç©èªã§ãã
å 責äºé
ãã®ã·ãªãŒãºã®èšäºã«ã¯ããã¬ãŒãã³ã°ã®é床ãéžæããã³å€æŽããæ¹æ³ãããããžãæ§æããæ¹æ³ã䜿çšãããããŒã¿ã»ãããå ·äœçã«åŠçããæ¹æ³ãªã©ãå€ãã®è³ªåãå«ãŸããŠããŸããã 詳现ãæãäžããã®ã§ã¯ãªãããããžã§ã¯ãå šäœã«ã€ããŠæžããŠãç§ãçŽé¢ããæ ¹æ¬çãªåé¡ãšãã®å¯èœãªè§£æ±ºçã«ã€ããŠè©±ãããã£ãã®ã§ãã
ãŸããç§ã¯è±èªã®èšå€§ãªæ°ã«ã€ããŠäºåã«è¬çœªããããšæããŸãïŒãã®åéã«ã¯ãã·ã¢èªã®æç®ã¯ã»ãšãã©ãªããæ £ããŠãããã®ããã«æžããŸãããããã·ã¢ã®ã¢ããã°ã䜿çšããããšããå ŽæããããŸãã
ãã¹ãŠã®è³æãããŒã¿ã»ãããåçããããªã¯ãªãŒãã³ãœãŒã¹ããååŸãããæè²ç®çã®ã¿ã«äœ¿çšãããŸãã
æ°Žã®äžã®ãªãŒã«ïŒ
ãããããããŒã«ãã§ãŒã³ïŒç§ã¯èªåã§ããªã倧人ãéžã¶ããšã«ããŸããããåæã«æãæè»ãªããŒã«ããããéžã³ãŸããã ããã¯ããã«CaffeãšããŸããŸãªããŒãã³ã¢C ++ã©ã€ãã©ãªãåé€ããŸãããçµå±ãããã¯ç 究ãããžã§ã¯ãã§ãïŒ
ååãšããŠãïŒåœæïŒãã¢ããšããŒãã ããæ®ã£ãŠããŸããïŒãã³ãœã«ãããŒã¯ãŸã åºãŠããŸããïŒã PythonãšLuaã¯ã©ã¡ããããç¥ã£ãŠããŠãäž¡æ¹ã®èšèªã§ããªãã®çµéšãæã£ãŠããã®ã§ãéžæã¯çŽç²ã«è¶£å³ã®è¯ããã®ã§ãããè¡šçŸãããã³ããäžè¬åãããããã§ãã ãã¢ãã§ã¯ãªãããŒãã«ããå®æããã¬ã³ã¬ã®å±€ã®è£åãšããŠãç§ã¯ã©ã¶ãã¢ãæ¬è³ªçã«åãã¬ã³ã¬ã§ããããã¢ãã®äžã«äœ¿çšããããšã«ããŸããã
ç§ã¯ååãªç¥èãæã£ãŠéžæããªãã£ããã€ãŸãããããã¯ãŒã¯ã®çµéšããŸã ãªãããšãããã«èšããªããã°ãªããªãã®ã§ããã®éçšã§äœåºŠãåŸæããããŒããéžæããªãã£ãããšãæ²ããããŸããã ãã®çµæãç§ã¯ãŸã ã©ã¡ããè¯ãã決å®ããŠããŸãã:)
ãã©ãããã©ãŒã ãéžæããŸããã®ã§ãã³ãŒãã£ã³ã°ã§ããŸãïŒ ã§ãäœïŒ
ææŠãã
é£ã¹ç©ã¯å€ããå°ãªããæ確ã§ããé¡æåããªã¹ãããéžæããã«ãé¡ã«æããŠçµµæåãéä¿¡ããããšæããŸãã å šäœãšããŠãç§ã¯é¡ãäœããåçãæ®ããããšæã£ãŠããŸããçæ³çã«ã¯ãã·ã¹ãã ã¯ç§ãã©ã®ç¬é¡ãæããŠããããç解ããã¡ãã»ãŒãžã«ãããå ¥åããå¿ èŠããããŸãã ããã«å€±æããŸããSkypeãVPSUããŸãã¯ãã³ã°ã¢ãŠããžã®ãã©ã°ã€ã³ã®åœ¢ã§ãããã¿ã€ãã«å°éããŸããã§ããïŒãŸã ïŒïŒãååãªæéããªãããããããã¯ãŒã¯ã·ã¹ãã ãå®æãããŸããã
幞ããªããšã«ããã®ãããªè£œåèŠä»¶ã¯æè¡çãªèŠä»¶ã«ç°¡åã«å€æã§ããŸããç°¡åã«èšãã°ãèªåæ®ããã¹ãã€ãªãŒã«å€æã§ããããã«ããå¿ èŠããããŸãã
é¡ãã¹ãã€ãªãŒã«å€æããã«ã¯ãæåã«é¡ãèŠã€ããŠéžæããå¿ èŠããããŸãïŒãŠãŒã¶ãŒãç»é¢äžã§é¡ãæããããã«åŒ·å¶ãããã¯ãããŸãããïŒïŒã
ãããã£ãŠãã¢ã«ãŽãªãºã ïŒ
- é¡ãæ¢ããŠããŸãã
- åãåããŸãã
- ç¬é¡ã«å€æããŸãã
- ??????
- å©çïŒ
ãã¹ãŠãæããããšãã§ããŸãïŒ
ãã äœïŒ æåã«ãé¡æ€åºã«ã€ããŠèª¬æããŸãããã ã€ã³ã¿ãŒãããã«ã¯ãç»åã®åé¡ã«é¢ããèšäºããããããããŸãã ãããããŸããåé¡ã¯å¿ èŠãããŸããããæ€åºã¯å¿ èŠã§ãïŒ ãããŠãããã¯ã¯ããã«è€éã§ãã 幞ããªããšã«ãæåã®éèŠãªæŽå¯ãããã«è¡šç€ºãããŸããæ€åºãåé¡ã«æžããããšãã§ããŸãã ãããã¯ãŒã¯ãååŸããŠãç»åå šäœã§ã¯ãªãããã®ç»åå ã®ãã¹ãŠã®æ£æ¹åœ¢ã®ãŠã£ã³ããŠã«é©çšããŠã¿ãŸãããã ããæ£ç¢ºã«ã¯ããã¹ãŠã§ã¯ãªããïŒxãyïŒã«æ²¿ã£ããªãã»ããïŒ4 iã4 jïŒãæã€ããã€ãã®ãµã€ãºã®ãŠã£ã³ããŠã§ãiãjã¯ïŒ0ãceilïŒw / 4ïŒïŒãïŒ0ãceilïŒh / 4ïŒïŒã
ã¢ã«ãŽãªãºã ïŒããŒãã³ãŒãïŒãå€æããŸãã
def windows(img): window_size = min(img.height, img.width) while not_too_small(window_size): y = 0 while y < img.height: while x < img.width: yield (x, y, x + window_size, y + window_size) x += dx if pixels_x_left_unyilded(): yield (img.width - window_size, y, img.width, y + window_size) y += dy if pixels_y_left_unyilded(): while x < img.width: yield (x, img.hight - window_size, x + window_size, img.hight + window_size) x += dx window_size /= resizing_factor dx /= resizing_factor dy /= resizing_factor
åèšã§ãããã€ãã®ç°ãªã瞮尺ã§ç»åã®ãµã€ãºãå€æŽããå瞮尺ã«å¯ŸããŠã4ãã¯ã»ã«ã®ã¹ãããã§åºå®ãµã€ãºã®ãŠã£ã³ããŠãé§åããŸãã ãããŠãåæ£æ¹åœ¢ã®é¡ãåé¡ããŸãã ãã®åŸããã¡ãããå人ã«ã©ã€ãã¢ãããããå€æ°ã®æ£æ¹åœ¢ãååŸããã®ã§ãããããäœããã®åœ¢ã§ããŒãžããå¿ èŠããããŸãã ã¢ã«ãŽãªãºã ã¯ç°ãªããšèããããŸãããè³¢ãã¯ãããŸãããã匷ã亀差ããäžã§æãç §ããããæ£æ¹åœ¢ãéžæããŸãïŒ
def filter_frames(frames): res = [] while len(frames) > 0: frames.sort(by=probability_of_face) res.append(frames[0]) frames = frames[1:] for f in frames: if intersection(res[-1], f) > big_enough: frames.remove(f)
æããŸããïŒ
ãããŠäœïŒ 幞ããªããšã«ããã£ãŒãã©ãŒãã³ã°ã«é¢ããããã€ãã®ããã¹ãããã³ãããªã³ãŒã¹ããã®ç¥èãããã€ãã®èå³æ·±ãããã°ãããã³çŸä»£ç 究ã«é¢ããããªãå€æ°ã®äžé£ã®æ¢èªèšäºïŒãã®æç¹ã§ããã®æã®åºæºã«ãã£ãŠå€§ããã£ãããããã«ãããããããååïŒã
ç»åã䜿çšãããå Žåã¯ãç³ã¿èŸŒã¿ãããã¯ãŒã¯ã䜿çšããŸãã äŸå€ãªãã
å®éããã®åéã«ã¯å倧ãªäººãã¡ããã®å¥ã®æèŠããããŸããæ®éã®ã¬ã€ã€ãŒãšéªæªãªã¬ã€ã€ãŒã®ç³ã¿èŸŒã¿ã䜿çšããã®ã¯æ£ããããšã§ãã å®éããããã¯éåžžã®ã¬ã€ã€ãŒã«ãããŸãããããªããžã§ã¯ãã®äœçœ®ããç¬ç«ããã䜿ãå€ããããç¹æ§ãåããŠããŸãã ãããããã®ç¹æ§ã¯ã第äžã«ããããã¯ãŒã¯èªäœã«ãã£ãŠåŠç¿ãããå¯èœæ§ãããã第äºã«ãæ€åºäžã«äœçœ®ãéèŠã§ããããããŸã£ããæ£ãããããŸããïŒ
ãã®ã¢ãããŒãã®æªããã¥ãŒã¹ã¯ãææ°ã®ããŒããŠã§ã¢ã«å®è£ ã§ããªãããšã§ããããã§ããã®ãªãã·ã§ã³ãæ°å幎é延æããç³ã¿èŸŒã¿ãããã¯ãŒã¯ãäœæããŸããã
ãããŠãããã¯ãšãŠãç°¡åã§ãã CNNã®æåã®ç»æçãªçªç Žå£ã§ããAlexNetã®äŸã«åŸã£ãŠãã ãããAlexNetã®ã¢ãŒããã¯ãã£ã¯éåžžã«ç°¡åã«ç¹°ãè¿ãããšãã§ããŸãã åãã¬ãŒãã³ã°ãéåžžã«ç°¡åã§ããããšãé€ããŠããããã¯ãŒã¯ã倧ããã»ã©è¯ãã§ããããã³ãã³ã®ãããã§ãããããã¢ãŠããšåŒã°ããææ³ã䜿çšããŠããã«å¯ŸåŠããããšã¯éåžžã«ç°¡åã§ã念ã®ããã¹ã±ãŒã«ããããã«æžè¡°ãããŸãã
ç§ã®æåã®ããŸã å°ãããããã¯ãŒã¯ïŒ
def build_net12(input): network = lasagne.layers.InputLayer(shape=(None, 3, 12, 12), input_var=input) network = lasagne.layers.dropout(network, p=.1) network = conv(network, num_filters=16, filter_size=(3, 3), nonlin=relu) network = max_pool(network) network = DenseLayer(lasagne.layers.dropout(network, p=.5), num_units=16, nonlin=relu) network = DenseLayer(lasagne.layers.dropout(network, p=.5), num_units=2, nonlin=relu) return network
äž»ã«å°ããã®ã¯ããã®æç¹ã§å©çšå¯èœãªGPUããŸã ãªãã£ããããCPUã§æé©åããããã§ããããã¯éåžžã«é ãã§ãã
ããŠãç§ãã¡ã¯ãã§ã«åŠç¿ããŠããŸããïŒ
ãããŠäœã§ïŒ 幞ããªããšã«ãåè¯ãªäººã ã¯é¡ã®èªèãšæ€åºã®ããã®å€ãã®ãªãŒãã³ããŒã¿ã»ãããäœæããŸããã ç§ãæåã«ããããšã¯ãFFDBãšããããŒã¿ã»ãããååŸããããšã§ããã ãã®äžã«ã¯å€ãã®åçãããããã®äžã«é¡ãæ¥åã§ããŒã¯ãããŠããŸãïŒåçã®çäžã§ã¯ãªããæ¥åã®ãã©ã¡ãŒã¿ãŒã¯ããã¹ããã¡ã€ã«ã«åå¥ã«æžã蟌ãŸããŸãïŒã ãã®ããŒã¿ã»ããã¯æè²ç®çã«ã®ã¿äœ¿çšã§ããŸããããŸãã«ãã®ãããªç®æšããããŸãããïŒ :)ããã«ãããã«ããã€ãã®ããŒã¿ãæããŠãèªåã§ããŒã¯ã¢ããããCPDVã«äŒŒãåçããååŸããŸããã
ãã¹ãŠãããã«ãããŸããæãã«è¡ããŸãããïŒ
è¡ãã ãããŠããã«ãéæ³ã®ããã«ãå€æããŸããïŒ
ã¹ã¯ãªãŒã³ã·ã§ããã¯ãDeepEventãšåŒã°ãããã¥ãŒã©ã«ãããã¯ãŒã¯çšã«ç¹å¥ã«éçºããããã¬ãŒãã³ã°ç£èŠã·ã¹ãã ã§æ®åœ±ãããŸãããèå³ãããå Žåã¯ãå¥ã®èšäºã§èª¬æããŸãã
æåã®10åã®ãã¬ãŒãã³ã°ã®ç¹°ãè¿ãã¯ãããããã»ãšãã©èšãããã©ã³ãã ãªéã¿ã®åæåã«å€§ããäŸåããŠãããšããçç±ã ãã§ã«ãããããŸãã
æäœäŸã§ã¯ããããã¯ãŒã¯ãé¡ãèŠã€ãããã¹ãŠã®ãŠã£ã³ããŠã¯èµ€ã§ããŒã¯ããããã£ã«ã¿ãªã³ã°åŸã«æ®ã£ãŠãããŠã£ã³ããŠã¯ç·ã§ããŒã¯ãããŸãã
ãŸããããã§å°ãè©æ¬ºãè¡ãããŠããããšãèªããŠããŸãããã¹ãŠã®ã°ã©ãã¯ãéåžžã«å®éšçãªãã®ã§ã¯ãªããããé«åºŠãªãã®ã§ãä¿®æ£ãå¿ èŠãªå Žæã§äœæãããŸãããã䌌ãŠããŸãã å®éãDeepEventã¯äžåºŠã«éçºãããããã§ã¯ãªããæåã®å®éšã®çµæã¯æ°žä¹ ã«å€±ãããŸããã ç§ãä»èŠããŠããããã«ããã®ãããã¯ãŒã¯ã¯æåã¯92ïŒ ã§ã¯ãªããçŽ89.5ïŒ ãçæããŸããã
ãããŠãç§ã92ïŒ ãšããå°ããªåªåã§ãããã¯ãŒã¯ãéåžžã«é«ã衚瀺ããããšããŠããå®éã®æ€åºå質ã«ã¯å€ãã®ããšãæãŸããŠããŸãã ã©ããã ãã倧ããªãããã¯ãŒã¯ãåŠã¶å¿ èŠããããŸãïŒ
def build_net48(input): network = lasagne.layers.InputLayer(shape=(None, 3, 48, 48), input_var=input) network = lasagne.layers.dropout(network, p=.1) network = conv(network, num_filters=64, filter_size=(5, 5), nolin=relu) network = max_pool(network) network = conv(network, num_filters=64, filter_size=(5, 5), nolin=relu) network = max_pool(network) network = conv(network, num_filters=64, filter_size=(3, 3), nolin=relu) network = max_pool(network) network = conv(network, num_filters=64, filter_size=(3, 3), nolin=relu) network = max_pool(network) network = DenseLayer(lasagne.layers.dropout(network, p=.5), nolin=relu, num_units=256) network = DenseLayer(lasagne.layers.dropout(network, p=.5), nolin=relu, num_units=2) return network
ãããŠãããã¯äœãèµ·ãããŸããã ãã£ãŒãã©ãŒãã³ã°ã«ã¯å€§éã®ããŒã¿ãå¿ èŠã§ãããããèšäºã§äŒããã®ãå¿ããããšããããããŸãã ããããã äžèšã®ããŒã¿ã»ããã䜿çšããŠãå°ããªã¢ãã«ãé©åã«ãã¬ãŒãã³ã°ããããšãã§ããŸããããå°ããªã¢ãã«ã§ã¯å¿ èŠãªå質ãåŸãããŸããã§ããã 倧èŠæš¡ã¢ãã«ã¯éåžžã®äœå€ããŸã£ããæºãããŠããŸããã§ãããããããã¢ãŠãã®ãããå€ãäžãããšãããã«åèšç·ŽãããŸãããããã¯è«ççã§ãã倧èŠæš¡ã¢ãã«ã¯å°éã®èšç·ŽããŒã¿ãèŠããããã§ãã
å¢åŒ·
ããŠãç§ã¯ããå€ãã®ããŒã¿ãå¿ èŠã ãšèããŸãã-ãã£ãšããŒã¿ããããŸãããïŒ ãããŠã圌ãåŸã§åŠãã ããã«ãããŒã¿æ¡åŒµãšåŒã°ããããã»ã¹ãå®è£ ããŸããïŒããã¯ãå€æãå ã®ããŒã¿ã«é©çšããããšãã«è¡ããããã¬ãŒãã³ã°ãµã³ãã«ã®ãµã€ãºãå¹æçã«æ°çŸåãããã«ã¯æ°ååã«ããŸãã
ãããã£ãŠãåäŸã§ã¯ã0.5ã®ç¢ºçã§ãé¡/é¡ã§ã¯ãªãã¯ã©ã¹ãããããå€åããªããããæ°Žå¹³ã«åæ ããŸãã ãŸããå人ã«ã€ããŠãããŒã¿ã»ããã«ååšããæ¥åããååŸããå ã®æ£æ¹åœ¢ãååŸããŸããã§ããããæåã®æ£æ¹åœ¢ã¯ç¹å®ã®ééã§ã©ã³ãã ã«ãããã«å¢å ïŒãŸãã¯æžå°ïŒãã次ã«ã誀ã£ãŠxã«ãããã«ã·ããããäžå®ã®ééã§yã
ããã«ãåŸã§ãã®æ£æ¹åœ¢èªäœãååŸããªãããã«æãã€ããŸããããxãŸãã¯yïŒ50/50ïŒã§ã©ã³ãã ã«ãããã«åŒã䌞ã°ãããŸããã ãã®çµæãé¡ããåçããé·æ¹åœ¢ãåãåãããå§çž®ã«ãã£ãŠæ£æ¹åœ¢ã«å€æããå¿ èŠããããŸãã ãã®å€æã®éãã¯ãåã®å€æã¯æ£æ¹åœ¢ã®ãµã€ãºãšäœçœ®ãå€æŽããŸãããé¡èªäœã¯å€åœ¢ããªãããšã§ãããã®å€æã¯é¡ãå€åœ¢ããŸããåçŽãŸãã¯æ°Žå¹³ã®ããããã«ãããã«äŒžçž®ããŸãã
æ¬äŒŒã³ãŒãã®å¢åŒ·ïŒ
def get_rnd_img_frame(img, box, net_input_size): box = move_box(box, random(minx, maxx), random(miny, maxy)) box = scale_box(box, random(minscale, maxscale)) if random.random() >= 0.5: stretch_x, stretch_y = random(1., stretchx), 1 else: stretch_x, stretch_y = 1, random(1., stretchy) box = stretch_box(box, stretch_x, stretch_y) frame = img.crop(box) if random() > 0.5: frame = mirror(frame) return frame.resize((net_input_size.x, net_input_size.y))
äžèšã®çµã¿åããã䜿çšãããšãå¹æçã«ç¡éã®ããŒã¿ã»ãããåŸãããŸãããç§ã®æšå®ã«ãããšã500æ代以äžã®ãã¬ãŒãã³ã°ãç¹°ãè¿ãç»åã®å¯èœæ§ã¯ãç»åãµã€ãºã®10åã®1ååŸã§ããã
åãå°ããªã¢ãã«ã®çµæã以äžã«ç€ºããŸããããã¬ãŒãã³ã°ã»ãããšãã¹ãã»ãããè¿œå ãããŠããŸãã
äœæ¥ã®äŸã§ã¯ããã£ã«ã¿ãªã³ã°ã2段éã«åãããããéãæ£æ¹åœ¢ããŸã ãããŸãïŒæåã¯åãµã€ãºã®ãŠã£ã³ããŠã®ã¿ãåå¥ã«ãã£ã«ã¿ãªã³ã°ããããµã€ãºã®äžããæé©ãªãã®ãéžæãïŒéïŒãåæã«ãã¹ãŠã®ãµã€ãºããã°ããŒãã«ã«éžæããŸãïŒç·ïŒäœããã®çç±ã§ããŠã£ã³ããŠã®ã¹ã©ã€ãæé ãæžãããŸããã
æé©åi
確ãã«ãå°éã®ãã¬ãŒãã³ã°ããŒã¿ã®èŠè¿ãã«ãå¥ã®åé¡ããããŸãããæœåšçã«ç¡éã®éã®ããŒã¿ã«ã¯ãæœåšçã«ç¡éã«åŒ·åãªã³ã³ãã¥ãŒã¿ãŒãå¿ èŠã§ãïŒ ãŸãã¯ã¹ããŒããªããªãã¯ã ç§ã¯ãœãããŠã§ã¢ãããå°éã«ããŠããã®ã§ã次åã¯ç¡éã«åŒ·åãªã³ã³ãã¥ãŒã¿ãŒãæ§ç¯ããããšã決å®ããçŸåšã®åé¡ãã¹ããŒãããªãã¯ã§è§£æ±ºããŸãããã¬ãŒãã³ã°çšã«ããŒã¿ã»ãããäºåçæãããå®å šã«ã¡ã¢ãªã«ããŒãããŸãããç¹å®ã®ã€ã³ããã¯ã¹ãäœæããŸãæåã®äžå®å šãªããŒã¿ã»ãããå®è¡æã«çŽæ¥è£è¶³ããŸãã å®éãå埩äžããããããå ã®åãªããžã§ã¯ãã«å¯ŸããŠãäžèšã®ã¢ã«ãŽãªãºã ãåŒã³åºããæŽæ°ãããããŒã¿ããã®å Žã§çæããŸãã
ã¡ãªã¿ã«ãé¢çœã話ã¯ããã«é¢é£ããŠããŸãã CPUã§ããããã¹ãŠãããã°ããGPUã§å®è¡ãéå§ãããšãããã©ãŒãã³ã¹ããããããªããŸãããèªåã§å€æãããšãå¢åŒ·ã¢ã«ãŽãªãºã ã«ã¯å€æ°ã®ããžãã¯ãå«ãŸããŠããããã®åŸãç»åã®ãªãã¬ã¯ã·ã§ã³ãšãµã€ãºå€æŽãè¡ãããŸãïŒ ãããã£ãŠããããããã®1024èŠçŽ ãã¹ãŠã«å¯ŸããŠãå埩ããšã«æ°åã®ããããããæããŸãïŒ
äžè¬çã«ããã¡ãããããã¯ã«ããŽãªçã«ç§ã«åããªãã£ãã®ã§ãæŽçãã«è¡ããŸããã ãããŠããã¹ãŠãéåžžã«è«ççã§ããããšãå€æããŸãããã·ã³ã°ã«ã¹ã¬ããpythonããã°ã©ã ã§ã¯ãGPUã¯åçŽã«ã¹ãªãŒãããŸãããCPUã¯ãã£ãããšããããããçæããŸãã æ azineã¯æªãã§ããç§ãã¡ã¯ãããšæŠããªããã°ãªããŸããããããŠç§ã¯GPUããç§ãå©çšã§ããããããç¬éãã®ã£ã¬ãŒã®å¥Žé·ã®ããã«åäœããã¹ãã ãšæ±ºããŸããïŒ
解決çïŒ GPUããããã¯ããªãã§ãã ããïŒ ãããGPUãçŸåšã®ãããã¯ãŒã¯ã§ãããã¯ãŒã¯ãåŠç¿ããŠããéã«ãCPUã¯æ¬¡ã®ããããéåæã§æºåããŸãã ã ããç§ã¯ãã£ãã ãããŠãç§ã¯ãã®æè¡ã®æåã確信ããŠããŸãããããã£ããããŸãããããã¯ã»ãšãã©å©ãã«ãªããŸããã§ããã ç¹ã«å°èŠæš¡ãããã¯ãŒã¯ã§ã¯ãCPUãGPUãããã¯ããã«é·ãå®è¡ãããGPUã¯ã»ãšãã©ã®æéã¹ãªãŒãããããšãå€æããŸããã
ããŠãç§ã¯ãããã®ãã¹ãŠã®WebãµãŒãã¹ãèšèšããŸãããïŒ å€§éã®ãªããžã§ã¯ãã®äžŠåèªã¿åãå°çšåŠçãæé©åããæ¹æ³ã¯ïŒ ã·ã£ãŒãã£ã³ã°ïŒå¥åMapReduceïŒïŒ ããããã®ããã»ã¹ãéå§ããŠããããããåŠçãããããããã®äžéšãäžããçµæããã¥ãŒã«å ¥ããŠãåŸ æ©ããã«ããã«æ¬¡ã®ãããããã®äžéšãåŠçããŸãã ããã«ããã®ãã¥ãŒããªãã¹ã³ããå¥ã®ããã»ã¹ãéå§ããããŒã¹ãã©ã®ãããããã«å±ããŠããããç解ããããŒã¹ããããããããçµã¿ç«ãŠãŠã2çªç®ã®ã¿ãŒã³ã§ã¹ã¿ãã¯ããŸããGPUã§åäœããã¡ã€ã³ããã»ã¹ã¯æ¢ã«ããŒã¿ãååŸããŠããŸãã
ãããŠæåŸã«ã32åã®ã³ã³ãã¥ãŒãã£ã³ã°ã³ã¢ãåãããµãŒããŒã§æŠè£ ãã32åã®ããã»ã¹ã§æ¡åŒµããŒã¿ã®çæãéå§ãïŒ2ã€ã¯ã»ãšãã©åžžã«ã€ã³ã©ã€ã³ãŸãã¯GPUã§åŸ æ©ããŠããŸãïŒã2çªç®ã®æ代ããå§ãŸã£ãŠãGPUã¯ã»ãšãã©äžèŠã«ããŠã³ããŒãããŸããã
ã»ããæããŠïŒ
ãã®ãããéåžžã®ãµã€ãºã®ããã¡ã以å€ã®ã¢ãã«ãæ¢ã«æããããšãã§ããæåããŸããïŒãé©åãªèšå®ã§ãåèšç·Žãããäœåã®å€ã«åºãããããšã¯ãããŸããã
ããã§ã¯ãåŠç¿ããã»ã¹ã§åšå¢ã®ããããŒã¹ããã©ã®ããã«çŸããããæ確ã«èŠãããšãã§ããŸãïŒçç±-ãããããã«é²ãã§ãããŸãïŒãããããããã¹ãã§ãããæçµçã«ã¯ãã¹ãŠãå€å°è¯ããªããŸãã
次ã®ã·ãªãŒãºïŒ
ããã«å€ãã®ããŒã¿ãããã«å€ãã®ãããã¯ãŒã¯ããã£ãªãã¬ãŒã·ã§ã³ãå°è±¡çãªãããã¯ãŒã¯ã®ã¢ã³ãµã³ãã«ãçŸä»£ã®ãã¯ãããžãŒãããå€ãã®åçãå°å¥³ããã©ãïŒ