ãã©ãã°ï¼ããããã§è¶ ç°¡åã«ãªãªã¸ãã«ã®æ©æ¢°å¦ç¿ã¢ãã«ãã¤ããã¦ãã¾ãCreate MLãå¤§å¹ ãã¯ã¼ã¢ãããã¾ããã
æ°æ©è½ãå¢ããã®ã¨ã使ãæ¹ãè¥å¹²å¤ãã£ãï¼ããç°¡åã«ãªã£ãï¼é¨åãããã®ã§ãææ°çã¨ãã¦æ¬è¨äºããéããã¾ãã
ãªããNDAã«é æ ®ãã¦ã¹ã¯ãªã¼ã³ã·ã§ããã¯Appleã®å ¬éè³æããã³ç¾è¡ãã¼ã¸ã§ã³ã®ãã®ã§ä»£ç¨ãããã¨ã«ãã¾ãã
Create MLã®èµ·åæ¹æ³
ããã¾ã§ã¯Create MLã¯ã¾ã ç¬ç«ããã¢ããªã¨ãã¦æä¾ããã¦ããããPlaygroundã«ã³ã¼ããæ¸ãã¦å®è¡ãã¦ã¢ããªã±ã¼ã·ã§ã³ã®UIã«ã¢ã¯ã»ã¹ãã¦ãã¾ããã
ãããmacOS 10.15 Catalina / Xcode 11ã§æä¾ãããææ°ãã¼ã¸ã§ã³ã§ã¯ãç¬ç«ããã¢ããªï¼Create ML.appï¼ã¨ãã¦æä¾ãããããã«ãªãã¾ããã
Xcode 11ã®ã¡ãã¥ã¼ããã
[Xcode] > [Open Developer Tool] > [Create ML]
ãé¸æãããã¨ã§èµ·åãã¾ãã
使ç¨æ¹æ³ï¼ç»ååé¡å¨ï¼Image Classifierï¼
ããã¸ã§ã¯ãã®ä½æ
[File] > [New Project] ãé¸æããã¨ãã³ãã¬ã¼ãé¸æç»é¢ãç«ã¡ä¸ããã®ã§ã"Image Classifier"ãé¸æãã¾ãã
ãã¼ã¿ã»ãããç¨æãã
ã©ããããã¼ã¿ãç¨æãããã§ããããã¥ã¼ããªã¢ã«ã«ããã¨ã
- ã©ãã«ãã¨ã«æä½ã§ã10æã®ç»å
- ã©ãã«ãã¨ã«ææ°ã®ãã©ã³ã¹ãã¨ããã¨ï¼ãã¼ã¿ã¼ã¯10æãã¾ã¦ã¯1000æãã¿ãããªãã¨ãããªãï¼
Use at least 10 images per label for the training set, but more is always better. Also, balance the number of images for each label. For example, donât use 10 images for Cheetah and 1000 images for Elephant.
- JPEGãPNGçãç»åãã©ã¼ãããã¯ãªãã§ãããï¼UTIãpublic.imageã«é©åãã¦ããã°ï¼
- ãµã¤ãºã¯æã£ã¦ãªãã¦ãOK
- ãµã¤ãºããªãã§ãããããæä½ã§ã299x299ãã¯ã»ã«ã¯ãã£ãæ¹ãè¯ã
The images can be in any format whose uniform type identifer conforms to public.image. This includes common formats like JPEG and PNG. The images donât have to be the same size as each other, nor do they have to be any particular size, although itâs best to use images that are at least 299x299 pixels.
ãã¨ã¯å®éã«æ¨è«ãè¡ãã®ã¨åãç¶æ³ã§å¦ç¿ãã¼ã¿ãåéããæ¹ãããã¨ããããããªè§åº¦ãã©ã¤ãã£ã³ã°ã®ç¶æ³ã®ãã¼ã¿ããã£ãæ¹ããããã¨ãããã¨ãæ¸ããã¦ãã¾ãã
If possible, train with images collected in a way thatâs similar to how images will be collected for prediction.
Provide images with variety. For example, use images that show animals from many different angles and in different lighting conditions. A classifier trained on nearly identical images for a given label tends to have poorer performance than one trained on a more diverse image set.
ã©ãã«ããã©ã«ãåã«ãããã®é ä¸ã«ãã¬ã¼ãã³ã°ãã¼ã¿ããã¹ããã¼ã¿ãé ç½®ãã¾ãã
å¦ç¿ï¼ã¢ãã«ã®è©ä¾¡
ãã¼ã¿ãã©ã«ãããã©ãã°ï¼ãããããã¾ãã
ãã¹ãï¼ã¢ãã«ã®è©ä¾¡ï¼ããã©ãã°ï¼ããããã
ãªãã·ã§ãã«ã§ãæ大ã¤ãã¬ã¼ã·ã§ã³åæ°ãæå®ãããããã¬ã¼ãã³ã°ãã¼ã¿ã«ãã¤ãºããã©ã¼ãä»å ããããå転ãå ãããã¨ãã£ããã©ã¡ã¼ã¿ãæå®ãããã¨ãã§ãã¾ãã
Playãã¿ã³ãã¯ãªãã¯ããã¨ãå¦ç¿ãéå§ããã¾ãã
å¦ç¿ãå®äºããã¨ãã¹ã³ã¢ã表示ããã¾ãã
ã¢ãã«ãä¿åãã
å¦ç¿ããã¢ãã«ã .mlmodel
ãã¡ã¤ã«ã¨ãã¦ä¿åãã¾ãã
ã¢ããªã«çµã¿è¾¼ã
ä½æãã .mlmodel
ãã¡ã¤ã«ãiOSã¢ããªã«çµã¿è¾¼ãã§ä½¿ç¨ãã¾ãã
å®è£ æ¹æ³ã¯ãã¡ãã®è¨äºãåèã«ãã¦ãã ããã
ã¾ãç»ååé¡ã® .mlmodel
ãã¡ã¤ã«ããã©ãã°ï¼ããããã§è©¦ããã¢ããªãGitHubã§å
¬éãã¦ããã®ã§ããã¡ãããã²æ´»ç¨ãã¦ãã ããã
使ç¨æ¹æ³ï¼é³å£°åé¡å¨ï¼Sound Classifierï¼
ï¼ç¶ãï¼
é¢é£ï¼SoundAnalysisã«ã¤ãã¦ã¡ãã£ã¨æ¸ãã¦ã¾ãï¼ï¼