YOLO11 ããNCNN ã«ãšã¯ã¹ããŒãããŠã¹ã ãŒãºã«å±éããæ¹æ³
ã³ã³ãã¥ãŒã¿ããžã§ã³ã¢ãã«ããã¢ãã€ã«ãçµã¿èŸŒã¿ã·ã¹ãã ã®ãããªèšç®èœåã®éãããããã€ã¹ã«å±éããã®ã¯ãåä»ãªããšã§ããæé©ãªããã©ãŒãã³ã¹ãåŸãããããã«æé©åããããã©ãŒãããã䜿çšããå¿ èŠããããŸããããã«ãããåŠçèœåãéãããããã€ã¹ã§ããé«åºŠãªã³ã³ãã¥ãŒã¿ããžã§ã³ã¿ã¹ã¯ãååã«åŠçã§ããããã«ãªããŸãã
NCNN ãã©ãŒããããžã®ãšã¯ã¹ããŒãæ©èœã«ãããã¢ãã«ãæé©åã§ããŸãã Ultralytics YOLO11ã¢ãã«ãæé©åããããšãã§ããŸãããã®ã¬ã€ãã§ã¯ãã¢ãã«ãNCNN ãã©ãŒãããã«å€æããæ¹æ³ã説æããŸããããã«ãããæ§ã ãªã¢ãã€ã«ããã€ã¹ãçµã¿èŸŒã¿ããã€ã¹ã§ãã¢ãã«ãããç°¡åã«åäœããããã«ãªããŸãã
ãªãNCNN ã
ãã³ã»ã³ããéçºãã NCNNNCNN ã¯ãLinuxãAndroid ãiOS ãmacOS ãå«ãå¹ åºããã©ãããã©ãŒã ãšäºææ§ãããã
NCNN ã¯ãã¢ãã€ã«CPUäžã§ã®é«éåŠçã§ç¥ããããã£ãŒãã©ãŒãã³ã°ã¢ãã«ã®ã¢ãã€ã«ãã©ãããã©ãŒã ãžã®è¿ éãªå±éãå¯èœã«ããŸããããã«ãããã¹ããŒãã¢ããªã®æ§ç¯ã容æã«ãªããAIã®ãã¯ãŒãæå äžã€ã§å©çšã§ããããã«ãªãã
NCNN ã¢ãã«ã®äž»ãªç¹åŸŽ
NCNN ã¢ãã«ã¯ãéçºè ãã¢ãã€ã«ãçµã¿èŸŒã¿ãããã³ãšããžããã€ã¹äžã§ã¢ãã«ãå®è¡ã§ããããã«ããããšã§ããªã³ããã€ã¹æ©æ¢°åŠç¿ãå¯èœã«ããåºç¯ãªäž»èŠæ©èœãæäŸããïŒ
-
å¹ççãã€é«æ§èœïŒNCNN ã¢ãã«ã¯å¹ççãã€è»œéã«äœãããŠãããRaspberry Pi ã®ãããªãªãœãŒã¹ã®éãããã¢ãã€ã«æ©åšãçµã¿èŸŒã¿æ©åšã§åäœããããã«æé©åãããŠããŸãããŸããæ§ã ãªã³ã³ãã¥ãŒã¿ããžã§ã³ããŒã¹ã®ã¿ã¹ã¯ã«ãããŠãé«ã粟床ã§é«ãããã©ãŒãã³ã¹ãéæããããšãã§ããŸãã
-
éåå:NCNN ã¢ãã«ã¯ãã¢ãã«ã®éã¿ãšæŽ»æ§åã®ç²ŸåºŠãäžããæè¡ã§ããéååããµããŒãããŠããããšãå€ããããã«ãããããã©ãŒãã³ã¹ãããã«åäžããã¡ã¢ãªãããããªã³ããåæžãããŸãã
-
äºææ§ïŒNCNN ã¢ãã«ã¯ã以äžã®ãããªäžè¬çãªãã£ãŒãã©ãŒãã³ã°ãã¬ãŒã ã¯ãŒã¯ãšäºææ§ããããŸãã TensorFlowãCaffeONNX.ãã®äºææ§ã«ãããéçºè ã¯æ¢åã®ã¢ãã«ãã¯ãŒã¯ãããŒãç°¡åã«äœ¿çšããããšãã§ããŸãã
-
䜿ããããïŒNCNN ã¢ãã«ã¯ãäžè¬çãªãã£ãŒãã©ãŒãã³ã°ãã¬ãŒã ã¯ãŒã¯ãšã®äºææ§ã«ãããããŸããŸãªã¢ããªã±ãŒã·ã§ã³ã«ç°¡åã«çµ±åã§ããããã«èšèšãããŠããŸããããã«ãNCNN ã¯ãç°ãªããã©ãŒãããéã§ã¢ãã«ãå€æããããã®ãŠãŒã¶ãŒãã¬ã³ããªãŒãªããŒã«ãæäŸããéçºç°å¢å šäœã§ã¹ã ãŒãºãªçžäºéçšæ§ãä¿èšŒããŸãã
é åãªãã·ã§ã³NCNN
YOLO11 ã¢ãã«ãNCNN ãã©ãŒãããã«ãšã¯ã¹ããŒãããã³ãŒããèŠãåã«ãNCNN ã¢ãã«ãéåžžã©ã®ããã«äœ¿ãããã®ããç解ãããã
NCNN å¹çãšããã©ãŒãã³ã¹ãéèŠããŠèšèšãããã¢ãã«ã¯ãããŸããŸãªé åãã©ãããã©ãŒã ã«å¯Ÿå¿ããŠããïŒ
-
ã¢ãã€ã«å±éïŒç¹ã«Android ãšiOS åãã«æé©åãããŠãããããã¢ãã€ã«ã¢ããªã±ãŒã·ã§ã³ã«ã·ãŒã ã¬ã¹ã«çµ±åã§ããããã€ã¹äžã§ã®å¹ççãªæšè«ãå¯èœã
-
çµã¿èŸŒã¿ã·ã¹ãã ãšIoTããã€ã¹ïŒUltralytics Guideã䜿ã£ãŠRaspberry Piäžã§æšè«ãå®è¡ããŠãååãªé床ãåŸãããªãå ŽåãNCNN ãšã¯ã¹ããŒããããã¢ãã«ã«åãæ¿ããããšã§é«éåã§ããå¯èœæ§ããããŸããNCNN ã¯ãRaspberry PiãNVIDIA Jetsonã®ãããªããã€ã¹ãç¹ã«ããã€ã¹äžã§è¿ éãªåŠçãå¿ èŠãªå Žåã«æé©ã§ãã
-
ãã¹ã¯ããããšãµãŒããŒãžã®å±éïŒLinuxãWindowsãmacOSã®ãã¹ã¯ãããããã³ãµãŒããŒç°å¢ã«å±éã§ããããé«ãèšç®èœåã§éçºããã¬ãŒãã³ã°ãè©äŸ¡ããµããŒãããŸãã
NCNN ãžã®ãšã¯ã¹ããŒã ïŒYOLO11 ã¢ãã«ã®å€æ
YOLO11 ã¢ãã«ãNCNN ãã©ãŒãããã«å€æããããšã§ãã¢ãã«ã®äºææ§ãšé åã®æè»æ§ãæ¡å€§ã§ããŸãã
ã€ã³ã¹ããŒã«
å¿ èŠãªããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯
ã€ã³ã¹ããŒã«ããã»ã¹ã«é¢ãã詳现ãªèª¬æãšãã¹ããã©ã¯ãã£ã¹ã«ã€ããŠã¯ãUltralytics ã€ã³ã¹ããŒã«ã¬ã€ããã芧ãã ãããYOLO11 ã«å¿ èŠãªããã±ãŒãžãã€ã³ã¹ããŒã«ããéã«ãäœããã®åé¡ãçºçããå Žåã¯ã解決çããã³ãã«ã€ããŠãããããåé¡ã¬ã€ããåç §ããŠãã ããã
䜿çšæ¹æ³
䜿ãæ¹ã®èª¬æã«å ¥ãåã«ãUltralytics YOLO11 ã®å šã¢ãã«ããšã¯ã¹ããŒãã«å¯Ÿå¿ããŠããããšã確èªããŠãããŸããã ã
䜿çšæ¹æ³
from ultralytics import YOLO
# Load the YOLO11 model
model = YOLO("yolo11n.pt")
# Export the model to NCNN format
model.export(format="ncnn") # creates '/yolo11n_ncnn_model'
# Load the exported NCNN model
ncnn_model = YOLO("./yolo11n_ncnn_model")
# Run inference
results = ncnn_model("https://ultralytics.com/images/bus.jpg")
ãµããŒããããŠãããšã¯ã¹ããŒããªãã·ã§ã³ã®è©³çŽ°ã«ã€ããŠã¯ãUltralytics é 眮ãªãã·ã§ã³ã®ããã¥ã¡ã³ãããŒãžãåç §ããŠãã ããã
ãšã¯ã¹ããŒããããYOLO11 NCNN ã¢ãã«ã®å±é
Ultralytics YOLO11 ã¢ãã«ãNCNN ãã©ãŒãããã«ãšã¯ã¹ããŒãããããšã«æåãããããããããããã€ããããšãã§ããŸããNCNN ã¢ãã«ãå®è¡ããããã®æåã®ã¹ããããšããŠæšå¥šãããã®ã¯ãYOLO("./model_ncnn_model") ã¡ãœããã䜿çšããããšã§ããããããªãããä»ã®æ§ã ãªèšå®ã«ãããNCNN ã¢ãã«ã®ãããã€ã«é¢ãã詳现ãªèª¬æã«ã€ããŠã¯ã以äžã®ãªãœãŒã¹ãã芧ãã ããïŒ
-
Android:ãã®ããã°ã§ã¯ãAndroid ã¢ããªã±ãŒã·ã§ã³ãéããŠç©äœæ€åºã®ãããªã¿ã¹ã¯ãå®è¡ããããã«NCNN ã¢ãã«ã䜿çšããæ¹æ³ã«ã€ããŠèª¬æããŸãã
-
ããã¯ãªã¹:macOSã§ã¿ã¹ã¯ãå®è¡ããããã®NCNN ã¢ãã«ã®äœ¿ãæ¹ãç解ããã
-
ãªããã¯ã¹:ãã®ããŒãžã§ã¯ãRaspberry Piããã®ä»ã®é¡äŒŒããã€ã¹ã®ãããªéããããªãœãŒã¹ã®ããã€ã¹ã«ãNCNN ã¢ãã«ããããã€ããæ¹æ³ãåŠã¶ããšãã§ããŸãã
-
VS2017ã䜿çšããWindows x64:ãã®ããã°ã§ã¯ãVisual Studio Community 2017ã䜿çšããŠWindows x64äžã§NCNN ã¢ãã«ããããã€ããæ¹æ³ã«ã€ããŠèª¬æããŸãã
æŠèŠ
ãã®ã¬ã€ãã§ã¯ãUltralytics YOLO11 ã¢ãã«ãNCNN ãã©ãŒãããã«ãšã¯ã¹ããŒãããããšã«ã€ããŠèª¬æããŸããããã®å€æã¹ãããã¯ãYOLO11 ã¢ãã«ã®å¹çãšã¹ããŒããåäžãããããå¹æçã§éããããªãœãŒã¹ã®ã³ã³ãã¥ãŒãã£ã³ã°ç°å¢ã«é©ãããã®ã«ããããã«éåžžã«éèŠã§ãã
詳ãã䜿çšæ¹æ³ã«ã€ããŠã¯ã NCNN ã®å ¬åŒããã¥ã¡ã³ããåç §ããŠãã ããã
ãŸããUltralytics YOLO11 ã®ãã®ä»ã®çµ±åãªãã·ã§ã³ã«ãèå³ãããå Žåã¯ãçµ±åã¬ã€ãããŒãžãã芧ãã ããã
ããããã質å
Ultralytics YOLO11 ã®ã¢ãã«ãNCNN ãã©ãŒãããã«ãšã¯ã¹ããŒãããã«ã¯ïŒ
Ultralytics YOLO11 ã¢ãã«ãNCNN ãã©ãŒãããã«ãšã¯ã¹ããŒãããã«ã¯ã以äžã®æé ã«åŸã£ãŠãã ããïŒ
-
Python:ã䜿çšããã
export
é¢æ°ãYOLO ã -
CLI:ã䜿çšããã
yolo
ã³ãã³ããexport
ãšããè°è«ã«ãªãã
詳现ãªãšã¯ã¹ããŒããªãã·ã§ã³ã«ã€ããŠã¯ãããã¥ã¡ã³ãã®ãšã¯ã¹ããŒãããŒãžãã芧ãã ããã
YOLO11 ã¢ãã«ãNCNN ã«èŒžåºããå©ç¹ã¯äœã§ããïŒ
Ultralytics YOLO11 ã®ã¢ãã«ãNCNN ã«ãšã¯ã¹ããŒããããšãããã€ãã®å©ç¹ããããŸãïŒ
- å¹çæ§ïŒNCNN ã¢ãã«ã¯ã¢ãã€ã«ããã³çµã¿èŸŒã¿ããã€ã¹çšã«æé©åãããŠãããéãããèšç®ãªãœãŒã¹ã§ãé«ãããã©ãŒãã³ã¹ãçºæ®ããŸãã
- éåå:NCNN ã¯ãã¢ãã«ã®é床ãåäžãããã¡ã¢ãªäœ¿çšéãåæžããéååã®ãããªãã¯ããã¯ããµããŒãããŠããŸãã
- å¹ åºãäºææ§ïŒAndroid ãiOS ãLinuxãmacOSãªã©ãè€æ°ã®ãã©ãããã©ãŒã ã§NCNN ã¢ãã«ãå±éã§ããŸãã
詳现ã¯ãããã¥ã¢ã«ã®ã NCNN ãžã®ãšã¯ã¹ããŒããã»ã¯ã·ã§ã³ãåç §ããŠãã ããã
ã¢ãã€ã«AIã¢ããªã±ãŒã·ã§ã³ã«NCNN ã
NCNNTencentã«ãã£ãŠéçºãããç¹ã«ã¢ãã€ã«ãã©ãããã©ãŒã çšã«æé©åãããŠããŸããNCNN ïŒ
- é«æ§èœïŒã¢ãã€ã«CPUã§ã®å¹ççã§é«éãªåŠçã®ããã«èšèšãããŠããŸãã
- ã¯ãã¹ãã©ãããã©ãŒã ïŒã ã®ãããªäžè¬çãªãã¬ãŒã ã¯ãŒã¯ãšäºææ§ããããç°ãªããã©ãããã©ãŒã éã§ã®ã¢ãã«ã®å€æããããã€ã容æã«ãªããŸãã TensorFlowãONNX ãªã©ã®äžè¬çãªãã¬ãŒã ã¯ãŒã¯ãšäºææ§ããããããç°ãªããã©ãããã©ãŒã éã§ã®ã¢ãã«ã®å€æããããã€ãç°¡åã«ãªããŸãã
- ã³ãã¥ããã£ã»ãµããŒãïŒã³ãã¥ããã£ã®æŽ»çºãªãµããŒãã«ãããç¶ç¶çãªæ¹åãšã¢ããããŒããä¿èšŒãããŸãã
詳ããã¯ãããã¥ã¡ã³ãã®NCNN æŠèŠãã芧ãã ããã
NCNN ã¢ãã«ã®å±éã§ãµããŒããããŠãããã©ãããã©ãŒã ã¯ïŒ
NCNN ã¯æ±çšæ§ãé«ããããŸããŸãªãã©ãããã©ãŒã ã«å¯Ÿå¿ããŠããïŒ
- ã¢ãã€ã«ïŒAndroid iOS.
- çµã¿èŸŒã¿ã·ã¹ãã ãšIoTããã€ã¹ïŒRaspberry PiãNVIDIA Jetsonãªã©ã®ããã€ã¹ã
- ãã¹ã¯ããããšãµãŒããŒïŒLinuxãWindowsãmacOSã
Raspberry Piäžã§ã¢ãã«ãå®è¡ããã®ãååéããªãå Žåã¯ãRaspberry Piã¬ã€ãã§è©³ãã説æããŠããããã«ãNCNN ãã©ãŒãããã«å€æããããšã§ã¹ããŒãã¢ããã§ããã
Ultralytics YOLO11 NCNN ã¢ãã«ãAndroid ã«é 眮ããã«ã¯ã©ãããã°ããã§ããïŒ
Android ã«YOLO11 ã®ã¢ãã«ãé 眮ããïŒ
- Android çšã«ãã«ãããïŒNCNN Build forAndroidã¬ã€ãã«åŸã£ãŠãã ããã
- ã¢ããªã±ãŒã·ã§ã³ãšã®çµ±åïŒNCNN Android SDK ã䜿çšããŠããšã¯ã¹ããŒããããã¢ãã«ãã¢ããªã±ãŒã·ã§ã³ã«çµ±åããå¹ççãªãªã³ããã€ã¹æšè«ãå®çŸããŸãã
ã¹ããããã€ã¹ãããã®æé ã«ã€ããŠã¯ã YOLO11 NCNN ã¢ãã«ã®å±éã«é¢ããã¬ã€ããåç §ããŠãã ããã
ããé«åºŠãªã¬ã€ãã䜿çšäŸã«ã€ããŠã¯ãUltralytics ããã¥ã¡ã³ãããŒãžãã芧ãã ããã