Upgrade to Pro — share decks privately, control downloads, hide ads and more …

20170204-meganeco

ARIYAMA Keiji
February 04, 2017

 20170204-meganeco

「TensorFlowで趣味の画像収集サーバーを作る 2017年2月号」
顔領域検出ネットワークを作成し、さくらの高火力サーバー上で動作させました。

ARIYAMA Keiji

February 04, 2017
Tweet

More Decks by ARIYAMA Keiji

Other Decks in Technology

Transcript

  1. 

  2. 

  3. 

  4. ݱࡏͷߏ੒  Downloader Face Detection Megane Detection API 5FOTPS'MPX 確認・修正

    認識結果 JSON ܇࿅ λΠϜϥΠϯ ϝσΟΞ データセット ܇࿅
  5. EFG@DPOWFSU@UGSFDPSET QBUI JT@GBDF JT@NFHBOF PVUQVU@EJS 
 IBTI JOEFY PSJHJOBM@GJMF@OBNF 


    GJMF@OBNFPTQBUICBTFOBNF QBUI 
 
 XJUIPQFO QBUI SC BTJNBHF
 PVUQVU@QBUIPTQBUIKPJO PVUQVU@EJS TEUGSFDPSE IBTI JOEFY 
 
 XJUIUGQZUIPO@JP5'3FDPSE8SJUFS PVUQVU@QBUI BTXSJUFS
 FYBNQMFUGUSBJO&YBNQMF GFBUVSFTUGUSBJO'FBUVSFT GFBUVSF\
 GJMF@OBNF@CZUFT@GFBUVSF GJMF@OBNFFODPEF 
 PSJHJOBM@GJMF@OBNF@CZUFT@GFBUVSF PSJHJOBM@GJMF@OBNFFODPEF 
 JT@GBDF@JOU@GFBUVSF JT@GBDF 
 JT@NFHBOF@JOU@GFBUVSF JT@NFHBOF 
 JNBHF@CZUFT@GFBUVSF JNBHFSFBE 
 ^ 
 XSJUFSXSJUF FYBNQMF4FSJBMJ[F5P4USJOH  σʔληοτ࡞੒ʢ5'3FDPSEʣ
  6. إೝࣝ༻ͷϞσϧ  DPO YY DPO YY GD  QPPM Y

    DPO YY DPO YY QPPM Y GD  PVUQVU  MSO MSO Y
  7. SFTIBQFUGSFTIBQF QPPM <CBUDI@TJ[F > 
 EJNSFTIBQFHFU@TIBQF <>WBMVF
 
 GD@GD GD

    JOQVU@MBZFSSFTIBQF 
 XFJHIUT@TIBQF<EJN > XFJHIU@TUEEFW 
 CJBTFT@TIBQF<> CJBTFT@WBMVF 
 LFFQ@QSPCLFFQ@QSPC 
  શ݁߹૚΁ͷೖྗ
  8. EFG@EJTUPSU JNBHF 
 DSPQ@TJ[F/POF 
 JNBHF@DIBOOFMT 
 CSJHIUOFTT@NBY@EFMUB 
 DPOUSBTU@MPXFS

    
 DPOUSBTU@VQQFS 
 XJUIUGOBNF@TDPQF EJTUPSU BTTDPQF
 EJTUPSUFE@JNBHFUGDBTU JNBHF UGGMPBU 
 
 JGDSPQ@TJ[F
 EJTUPSUFE@JNBHFUGSBOEPN@DSPQ EJTUPSUFE@JNBHF <DSPQ@TJ[F DSPQ@TJ[F > 
 
 EJTUPSUFE@JNBHFUGJNBHFSBOEPN@GMJQ@MFGU@SJHIU EJTUPSUFE@JNBHF 
 EJTUPSUFE@JNBHFUGJNBHFSBOEPN@GMJQ@VQ@EPXO EJTUPSUFE@JNBHF 
 
 EJTUPSUFE@JNBHFUGJNBHFSBOEPN@CSJHIUOFTT EJTUPSUFE@JNBHF NBY@EFMUBCSJHIUOFTT@NBY@EFMUB 
 EJTUPSUFE@JNBHFUGJNBHFSBOEPN@DPOUSBTU EJTUPSUFE@JNBHF 
 MPXFSDPOUSBTU@MPXFS 
 VQQFSDPOUSBTU@VQQFS 
 SFUVSOEJTUPSUFE@JNBHF
 
  9. ݱࡏͷߏ੒  Downloader Face Detection Megane Detection API 5FOTPS'MPX 確認・修正

    認識結果 JSON ܇࿅ λΠϜϥΠϯ ϝσΟΞ データセット ܇࿅
  10. ΦʔτΤϯίʔμʢࣗݾූ߸ثʣ  DPOW YY DPOW YY DPOW YY DPOW YY

    DPOW YY EDPOW YY EDPOW YY EDPOW YY EFDPOW@MBTU YY EDPOW YY ˜ࠜઇΕ͍
  11. EFG@@WBSJBCMF@PO@DQV OBNF TIBQF JOJUJBMJ[FS 
 XJUIUGEFWJDF DQV 
 WBSUGHFU@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VQ@EPXO EJTUPSUFE@JNBHF 
 MBNCEBEJTUPSUFE@JNBHF 
 NBTL@JNBHFUGDPOE SBOEPN 
 MBNCEBUGJNBHFGMJQ@VQ@EPXO NBTL@JNBHF 
 MBNCEBNBTL@JNBHF 
 
 SFUVSOEJTUPSUFE@JNBHF NBTL@JNBHF 
  20. JNBHF NBTL@JNBHF@@MPBE@JNBHF GJMF@MJTU 
 JNBHF@TJ[FJNBHF@TJ[F 
 EJTUPSU5SVF 
 TIVGGMF5SVF 


    
 JNBHF@CBUDI MBCFM@CBUDIUGUSBJOTIVGGMF@CBUDI 
 <JNBHF NBTL@JNBHF> 
 CBUDI@TJ[F'-"(4CBUDI@TJ[F 
 DBQBDJUZDBQBDJUZ 
 NJO@BGUFS@EFRVFVF'-"(4NJO@BGUFS@EFRVFVF 
 OVN@UISFBET'-"(4OVN@UISFBET 
 
 JNBHF@CBUDIJNBHF@CBUDI
 MBCFM@CBUDIMBCFM@CBUDI  σʔλͷಡΈࠐΈ
  21. EFG@@MPTT MPHJUT MBCFMT 
 MPTTUGOOM@MPTT MPHJUTMBCFMT '-"(4CBUDI@TJ[F
 UGBEE@UP@DPMMFDUJPO MPTTFT MPTT

    
 
 MPTTFTUGHFU@DPMMFDUJPO MPTTFT 
 UPUBM@MPTTUGBEE@O MPTTFT OBNFUPUBM@MPTT  ޡࠩ
  22. :0-03FBM5JNF0CKFDU%FUFDUJPO You only look once (YOLO) is a state-of-the-art, real-time

    object detection system. On a Titan X it processes images at 40-90 FPS and has a mAP on VOC 2007 of 78.6% and a mAP of 44.0% on COCO test-dev.  http://pjreddie.com/darknet/yolo/
  23. +-----------------------------------------------------------------------------+ | NVIDIA-SMI 367.57 Driver Version: 367.57 | |-------------------------------+----------------------+----------------------+ |

    GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX TIT... Off | 0000:02:00.0 Off | N/A | | 22% 43C P2 144W / 250W | 11688MiB / 12206MiB | 88% Default | +-------------------------------+----------------------+----------------------+ | 1 GeForce GTX TIT... Off | 0000:03:00.0 Off | N/A | | 22% 35C P5 20W / 250W | 11605MiB / 12206MiB | 0% Default | +-------------------------------+----------------------+----------------------+ | 2 GeForce GTX TIT... Off | 0000:83:00.0 Off | N/A | | 22% 35C P5 19W / 250W | 11605MiB / 12206MiB | 0% Default | +-------------------------------+----------------------+----------------------+ | 3 GeForce GTX TIT... Off | 0000:84:00.0 Off | N/A | | 22% 34C P5 19W / 250W | 11603MiB / 12206MiB | 0% Default | +-------------------------------+----------------------+----------------------+  ͬͦ͘͞࢖ͬͯΈΔ
  24. EFG@@MPTT MPHJUT MBCFMT 
 MPTTUGOOM@MPTT MPHJUTMBCFMT '-"(4CBUDI@TJ[F
 UGBEE@UP@DPMMFDUJPO MPTTFT MPTT

    
 
 MPTTFTUGHFU@DPMMFDUJPO MPTTFT 
 UPUBM@MPTTUGBEE@O MPTTFT OBNFUPUBM@MPTT 
 
 MPTT@BWFSBHFTUGUSBJO&YQPOFOUJBM.PWJOH"WFSBHF  OBNFBWH 
 MPTT@BWFSBHFT@PQMPTT@BWFSBHFTBQQMZ MPTTFT <UPUBM@MPTT> 
 
 XJUIUGDPOUSPM@EFQFOEFODJFT <MPTT@BWFSBHFT@PQ> 
 UPUBM@MPTTUGJEFOUJUZ UPUBM@MPTT 
 
 SFUVSOUPUBM@MPTT  .VMUJ(16ରԠ https://blog.keiji.io/2016/12/tensorflow_advent_calendar.html
  25. EFG@@MPTT MPHJUT MBCFMT 
 MPTTUGOOM@MPTT MPHJUTMBCFMT '-"(4CBUDI@TJ[F
 UGBEE@UP@DPMMFDUJPO MPTTFT MPTT

    
 
 MPTTFTUGHFU@DPMMFDUJPO MPTTFT 
 UPUBM@MPTTUGBEE@O MPTTFT OBNFUPUBM@MPTT 
 
 IUUQTHJUIVCDPNUFOTPSGMPXUFOTPSGMPXJTTVFT
 
 SFUVSOUPUBM@MPTT  .VMUJ(16ରԠ https://github.com/tensorflow/tensorflow/issues/5652
  26. +-----------------------------------------------------------------------------+ | NVIDIA-SMI 367.57 Driver Version: 367.57 | |-------------------------------+----------------------+----------------------+ |

    GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX TIT... Off | 0000:02:00.0 Off | N/A | | 22% 40C P2 100W / 250W | 11688MiB / 12206MiB | 46% Default | +-------------------------------+----------------------+----------------------+ | 1 GeForce GTX TIT... Off | 0000:03:00.0 Off | N/A | | 22% 40C P2 121W / 250W | 11688MiB / 12206MiB | 35% Default | +-------------------------------+----------------------+----------------------+ | 2 GeForce GTX TIT... Off | 0000:83:00.0 Off | N/A | | 22% 38C P2 111W / 250W | 11688MiB / 12206MiB | 24% Default | +-------------------------------+----------------------+----------------------+ | 3 GeForce GTX TIT... Off | 0000:84:00.0 Off | N/A | | 22% 38C P2 132W / 250W | 11687MiB / 12206MiB | 40% Default | +-------------------------------+----------------------+----------------------+  .VMUJ(16ରԠޙͷOWJEJBTNJ