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

成長を止めない機械学習のやり方 / Don't stop 'til you get enoug...

成長を止めない機械学習のやり方 / Don't stop 'til you get enough (data).

Yuichiro Someya

March 23, 2018
Tweet

More Decks by Yuichiro Someya

Other Decks in Programming

Transcript

  1. ΞδΣϯμ  ͸͡Ίʹਓ޻஌ೳϒʔϜͱݬ໓ظ  ੒௕ΛࢭΊͳ͍ػցֶशͷ΍Γํʙ૊৫ɾνʔϜฤʙ  αʔϏε։ൃͱػցֶश  ػցֶशϓϩδΣΫτ 

    ੒௕ΛࢭΊͳ͍ػցֶशͷ΍Γํʙݸਓฤʙ  ૯߹֨ಆٕͱͯ͠ͷػցֶश  ͸͡Ίʹਓ޻஌ೳϒʔϜͱݬ໓ظ  ੒௕ΛࢭΊͳ͍ػցֶशͷ΍Γํʙ૊৫ɾνʔϜฤʙ  αʔϏε։ൃͱػցֶश  ػցֶशϓϩδΣΫτ  ੒௕ΛࢭΊͳ͍ػցֶशͷ΍Γํʙݸਓฤʙ  ૯߹֨ಆٕͱͯ͠ͷػցֶश
  2. ྫϞσϧͷ"1*Խʹඞཁͳ΋ͷ ֶशࡁΈϞσϧ ͷEVNQ  NPEFM\QC I ^ "1* BQQQZ 


    )551 T &OEQPJOU QSFEJDU JOGPͱ͔ 
 ϞσϧͷಡΈࠐΈͱ*0ϋϯυϥ ࡞ۀ طଘγεςϜʗΠϯϑϥ΁ͷΠϯςάϨʔγϣϯ
 -#ɺϞχλϦϯάɺ%/4౳ʑ ࣮ߦ؀ڥ %PDLFSpMF
  3. ྫϞσϧͷ"1*Խʹඞཁͳ΋ͷ ֶशࡁΈϞσϧ ͷEVNQ  NPEFM\QC I ^ "1* BQQQZ 


    )551 T &OEQPJOU QSFEJDU JOGPͱ͔ 
 ϞσϧͷಡΈࠐΈͱ*0ϋϯυϥ ࡞ۀ طଘγεςϜʗΠϯϑϥ΁ͷΠϯςάϨʔγϣϯ
 -#ɺϞχλϦϯάɺ%/4౳ʑ ࣮ߦ؀ڥ %PDLFSpMF ػցֶशϞσϧͷσϓϩΠʹ͸
 खؒͱ͕͔͔࣌ؒΔ
  4. def is_food_image(self, image_io): image = Image.open(image_io) result = self.classifier.infer(image) return

    result == Category.food ར༻ྫྉཧ͖Ζ͘ͷ৔߹ ύοέʔδԽ͞ΕͨػցֶशϞσϧͷݺͼग़͠
 ͋Δ͍͸҉໧ͳ"1*ίʔϧ
  5. def is_food_image(self, image_io): image = Image.open(image_io) result = self.classifier.infer(image) return

    result == Category.food ྫྉཧ͖Ζ͘ͷ৔߹ ύοέʔδԽ͞ΕͨػցֶशϞσϧͷݺͼग़͠
 ͋Δ͍͸҉໧ͳ"1*ίʔϧ έʔεʹΑΔ͕ αʔϏε։ൃͱ͍͏จ຺ʹ͓͍ͯ
 ػցֶशϞσϧ͸ίʔυͰ࣮૷͞ΕͨϩδοΫ
 ͱಉ౳ʹѻΘΕ͏Δ
  6. ࢖͏ ࡞Δ Ϩγϐ෼ྨثͷΧςΰϦʹ
 ʰຑം౾෗ʱΛ଍ͯ͠Έ͍ͨ िؒ͘Β͍͔͔Δͳ Ϛδ͔ʂ if category == 'ΧϨʔ':

    foo() + elif category == 'ຑം౾෗': + bar() ՝୊ൃݟ
 ΰʔϧઃఆ σʔλऩू σʔλՃ޻
 ෼ੳ &%" ֶश ධՁݕূ ຊ൪ ධՁݕূ
  7. ࢖͏ ࡞Δ Ϩγϐ෼ྨثͷΧςΰϦʹ
 ʰຑം౾෗ʱΛ଍ͯ͠Έ͍ͨ िؒ͘Β͍͔͔Δͳ Ϛδ͔ʂ if category == 'ΧϨʔ':

    foo() + elif category == 'ຑം౾෗': + bar() ՝୊ൃݟ
 ΰʔϧઃఆ σʔλऩू σʔλՃ޻
 ෼ੳ &%" ֶश ධՁݕূ ຊ൪ ධՁݕূ
  8. ࢖͏ ࡞Δ Ϩγϐ෼ྨثͷΧςΰϦʹ
 ʰຑം౾෗ʱΛ଍ͯ͠Έ͍ͨ िؒ͘Β͍͔͔Δͳ Ϛδ͔ʂ if category == 'ΧϨʔ':

    foo() + elif category == 'ຑം౾෗': + bar() ՝୊ൃݟ
 ΰʔϧઃఆ σʔλऩू σʔλՃ޻
 ෼ੳ &%" ֶश ධՁݕূ ຊ൪ ධՁݕূ
  9. $PPLJFDVUUFSʹΑΔςϯϓϨʔτԽ  ϓϩδΣΫτͷςϯϓϨʔτԽ  SVCZʹ͸CVOEMFS͕͋Δ͚Ͳʜ  IUUQTHJUIVCDPNBVESFZSDPPLJFDVUUFS  1ZUIPO +JOKB

    ੡ͷ൚༻ͳϓϩδΣΫτςϯϓϨʔτੜ੒πʔϧ  ಠࣗͷςϯϓϨʔτΛ૊Ή͜ͱ͕ग़དྷɺσʔλαΠΤϯε༻ͷ෺΋͋Δ  IUUQTHJUIVCDPNESJWFOEBUBDPPLJFDVUUFSEBUBTDJFODF
  10. "1* .JDSPTFSWJDF ͕͍͍ཧ༝  ػցֶशͱΞϓϦͰҟͳΔ࣮ߦ؀ڥ͕ར༻Ͱ͖Δ  ҟͳΔݴޠɺ$16(16  "1*ͷεέʔϧʹΑͬͯߴεϧʔϓοτͷ࣮ݱ͸Մೳ 

    ػցֶशϞσϧʹΑΔਪ࿦͸ॏ͍  ෼ྨثɺ౳ͷϓϦϛςΟϒͳػೳͷ࠶ར༻  ։ൃʹ͓͚Δ୲౰ൣғͷڥքઢͱͯ͠࠷ద ͩͱࢥ͏
  11. ࠶ܝϞσϧͷ"1*Խʹඞཁͳ΋ͷ ֶशࡁΈϞσϧ ͷEVNQ  NPEFM\QC I ^ "1* BQQQZ 


    )551 T &OEQPJOU QSFEJDU JOGPͱ͔ 
 ϞσϧͷಡΈࠐΈͱ*0ϋϯυϥ ࡞ۀ طଘγεςϜʗΠϯϑϥ΁ͷΠϯςάϨʔγϣϯ
 -#ɺϞχλϦϯάɺ%/4౳ʑ ࣮ߦ؀ڥ %PDLFSpMF ػցֶशͱͷυϝΠϯڞ༗౓ େ খ
  12. ࠶ܝϞσϧͷ"1*Խʹඞཁͳ΋ͷ ֶशࡁΈϞσϧ ͷEVNQ  NPEFM\QC I ^ "1* BQQQZ 


    )551 T &OEQPJOU QSFEJDU JOGPͱ͔ 
 ϞσϧͷಡΈࠐΈͱ*0ϋϯυϥ ࡞ۀ طଘγεςϜʗΠϯϑϥ΁ͷΠϯςάϨʔγϣϯ
 -#ɺϞχλϦϯάɺ%/4౳ʑ ࣮ߦ؀ڥ %PDLFSpMF ػցֶशͱͷυϝΠϯڞ༗౓ େ খ ͜ͷล͕ಛʹਏ͍
  13. ૯߹֨ಆٕͱͯ͠ͷػցֶश  ʰػցֶश͕ग़དྷΔΑ͏ʹͳΔʱͱ͸  ϒʔϜ΋ख఻͍ɺ৘ใ͕൙ཞ͍ͯ͠Δ Α͏ʹݟ͑Δ   ʰ͋Ε΋͜Ε΋ֶͼͨա͗Δʱ 

    ݸਓʹͱͬͯɺ໨ඪʗ໨తͷ۩ମԽ͕ॏཁʹͳ͖͍ͬͯͯΔ  ྫ͑͹ ʰαʔϏε։ൃʹػցֶशΛར༻͢Δதن໛ dਓ ͷݱ৔Ͱɺཱࣗͯ͠Ձ஋ΛੜΈग़ͤΔΤϯδχΞʹͳΔʱͱ͔