YOLO11 ããTF GraphDef ã«ãšã¯ã¹ããŒãããŠé åããæ¹æ³
YOLO11 ã®ãããªæå 端ã®ã³ã³ãã¥ãŒã¿ããžã§ã³ã¢ãã«ãããŸããŸãªç°å¢ã§å±éããå Žåãäºææ§ã®åé¡ã«ã¶ã€ããããšããããŸããGoogle's TensorFlowGraphDefãŸãã¯TF GraphDef ã¯ãã·ãªã¢ã©ã€ãºãããããã©ãããã©ãŒã ã«äŸåããªãã¢ãã«ã®è¡šçŸãæäŸããããšã§ã解決çãæäŸããŸããTF GraphDef ã¢ãã«åœ¢åŒã䜿çšããããšã§ãã¢ãã€ã«æ©åšãç¹æ®ãªããŒããŠã§ã¢ãªã©ãå®å šãªTensorFlow ãšã³ã·ã¹ãã ãå©çšã§ããªãç°å¢ã§ããYOLO11 ã¢ãã«ãå±éããããšãã§ããŸãã
ãã®ã¬ã€ãã§ã¯ãã¢ãã«ã ã¢ãã«ãã©ãŒãããã«ãšã¯ã¹ããŒãããæ¹æ³ãé ãè¿œã£ãŠèª¬æããŸãã Ultralytics YOLO11ãã®ã¬ã€ãã§ã¯ãTF GraphDef ã¢ãã«ã»ãã©ãŒãããã«ã¢ãã«ããšã¯ã¹ããŒãããæ¹æ³ãé ãè¿œã£ãŠèª¬æããŸããã¢ãã«ãå€æããããšã§ããããã€ãå¹çåããYOLO11 ã®ã³ã³ãã¥ãŒã¿ããžã§ã³æ©èœãããå¹ åºãã¢ããªã±ãŒã·ã§ã³ããã©ãããã©ãŒã ã§äœ¿çšããããšãã§ããŸãã
ãªãTF GraphDef ã«ãšã¯ã¹ããŒãããå¿ èŠãããã®ã§ããïŒ
TF GraphDef ã¯ãGoogle ã«ãã£ãŠéçºãããTensorFlow ãšã³ã·ã¹ãã ã®åŒ·åãªã³ã³ããŒãã³ãã§ãããYOLO11 ã®ãããªã¢ãã«ã®æé©åãšãããã€ã«äœ¿çšã§ãããTF GraphDef ã«ãšã¯ã¹ããŒãããããšã§ãã¢ãã«ãç 究ããå®äžçã®ã¢ããªã±ãŒã·ã§ã³ã«ç§»è¡ãããããšãã§ãããããã«ãããTensorFlow ãã¬ãŒã ã¯ãŒã¯ããªãç°å¢ã§ãã¢ãã«ãå®è¡ã§ããããã«ãªããŸãã
GraphDef 圢åŒã¯ãã¢ãã«ãçŽååãããèšç®ã°ã©ããšããŠè¡šçŸãããããã«ãããå®æ°ã®æãããã¿ãéååãã°ã©ãå€æãªã©ãããŸããŸãªæé©åæè¡ãå¯èœã«ãªãããããã®æé©åã«ãããå¹ççãªå®è¡ãã¡ã¢ãªäœ¿çšéã®åæžãæšè«é床ã®é«éåãä¿èšŒãããã
GraphDef ã¢ãã«ã¯ãGPUãTPUãAIããããªã©ã®ããŒããŠã§ã¢ã¢ã¯ã»ã©ã¬ãŒã¿ã䜿çšããããšãã§ããYOLO11 æšè«ãã€ãã©ã€ã³ã®å€§å¹ ãªæ§èœåäžã解ãæŸã€ãTF GraphDef ãã©ãŒãããã¯ãã¢ãã«ãšãã®äŸåé¢ä¿ãå«ãèªå·±å®çµåã®ããã±ãŒãžãäœæããå€æ§ãªã·ã¹ãã ãžã®å±éãšçµ±åãç°¡çŽ åããŸãã
TF GraphDef ã¢ãã«ã®äž»ãªç¹åŸŽ
TF GraphDef ã¯ãã¢ãã«ã®å±éãšæé©åãåçåããããã®æ確ãªæ©èœãæäŸããŸãã
ãã®äž»ãªç¹åŸŽã玹ä»ãããïŒ
-
ã¢ãã«ã®ã·ãªã¢ã©ã€ãº:TF GraphDef TensorFlow ã¢ãã«ãã·ãªã¢ã©ã€ãºãããã©ãããã©ãŒã ã«äŸåããªã圢åŒã§ä¿åããæ¹æ³ãæäŸããŸãããã®ã·ãªã¢ã©ã€ãºãããè¡šçŸã«ãã£ãŠããªãªãžãã«ã®Python ã³ãŒãããŒã¹ãªãã§ã¢ãã«ãããŒãããŠå®è¡ã§ããããã«ãªãããããã€ãç°¡åã«ãªããŸãã
-
ã°ã©ãã®æé©å:TF GraphDef ã¯ãèšç®ã°ã©ãã®æé©åãå¯èœã«ããããããã®æé©åã«ãããå®è¡ãããŒãåçåããåé·æ§ãåæžããç¹å®ã®ããŒããŠã§ã¢ã«åãããŠæäœã調æŽããããšã§ãããã©ãŒãã³ã¹ãåäžãããããšãã§ããŸãã
-
å±éã®æè»æ§ïŒGraphDef ãã©ãŒãããã«ãšã¯ã¹ããŒããããã¢ãã«ã¯ããªãœãŒã¹ã«å¶çŽã®ããããã€ã¹ããŠã§ããã©ãŠã¶ãç¹æ®ãªããŒããŠã§ã¢ãåããã·ã¹ãã ãªã©ãããŸããŸãªç°å¢ã§äœ¿çšããããšãã§ããŸããããã«ãããTensorFlow ã¢ãã«ã®å¹ åºãå±éã®å¯èœæ§ãåºãããŸãã
-
ãããã¯ã·ã§ã³ã»ãã©ãŒã«ã¹:GraphDef ã¯ããããã¯ã·ã§ã³ã»ãããã€ã¡ã³ãåãã«èšèšãããŠããŸããå¹ççãªå®è¡ãçŽååæ©èœãå®éã®ãŠãŒã¹ã±ãŒã¹ã«æ²¿ã£ãæé©åããµããŒãããŠããŸãã
é åãªãã·ã§ã³TF GraphDef
TF GraphDef ã«YOLO11 ã¢ãã«ããšã¯ã¹ããŒãããããã»ã¹ã«å ¥ãåã«ããã®ãã©ãŒãã ãã䜿çšãããå žåçãªå±éç¶æ³ãèŠãŠã¿ãŸãããã
ããã§ã¯ãTF GraphDef ãããŸããŸãªãã©ãããã©ãŒã ã§å¹ççã«å±éããæ¹æ³ã玹ä»ããã
-
TensorFlow ãµãŒãã³ã°ïŒãã®ãã¬ãŒã ã¯ãŒã¯ã¯ãæ¬çªç°å¢ã§TensorFlow ãTensorFlow Servingã¯ãã¢ãã«ç®¡çãããŒãžã§ã³ç®¡çãå¹ççãªã¢ãã«æäŸã®ããã®ã€ã³ãã©ã¹ãã©ã¯ãã£ãæäŸããŸããGraphDef ããŒã¹ã®ã¢ãã«ãæ¬çªã®ãŠã§ããµãŒãã¹ãAPIã«çµ±åããã·ãŒã ã¬ã¹ãªæ¹æ³ã§ãã
-
ã¢ãã€ã«ããã³çµã¿èŸŒã¿ããã€ã¹ïŒ TensorFlow Liteã®ãããªããŒã«ã䜿ãã°ãTF GraphDef ã®ã¢ãã«ããã¹ããŒããã©ã³ãã¿ãã¬ãããããŸããŸãªçµã¿èŸŒã¿ããã€ã¹çšã«æé©åããã圢åŒã«å€æããããšãã§ãããã¢ãã«ã¯ãå®è¡ãããŒã«ã«ã§è¡ããããªã³ããã€ã¹æšè«ã«äœ¿çšããããšãã§ããå€ãã®å Žåãããã©ãŒãã³ã¹ã®åäžãšãªãã©ã€ã³æ©èœãæäŸããŸãã
-
ãŠã§ããã©ãŠã¶ïŒ TensorFlow.js ã¯ãTF GraphDef ã¢ãã«ã®ãŠã§ããã©ãŠã¶å ã§ã®çŽæ¥å±éãå¯èœã«ãããããã¯ãJavaScriptãéããŠYOLO11 ã®æ©èœã䜿çšããã¯ã©ã€ã¢ã³ãåŽã§å®è¡ããããªã¢ã«ã¿ã€ã ã®ãªããžã§ã¯ãæ€åºã¢ããªã±ãŒã·ã§ã³ãžã®éãéããã®ã§ãã
-
ç¹æ®ãªããŒããŠã§ã¢ïŒ TF GraphDef ã¯ãã©ãããã©ãŒã ã«ãšããããªããããã¢ã¯ã»ã©ã¬ãŒã¿ãŒãTPU (Tensor Processing Units)ãªã©ã®ã«ã¹ã¿ã ããŒããŠã§ã¢ãã¿ãŒã²ããã«ããããšãã§ããããããã®ããã€ã¹ã¯ãèšç®éã®å€ãã¢ãã«ã«å¯ŸããŠæ§èœäžã®å©ç¹ãæäŸããããšãã§ããã
YOLO11 ã¢ãã«ã®ãšã¯ã¹ããŒãTF GraphDef
YOLO11 ãªããžã§ã¯ãæ€åºã¢ãã«ããæ§ã ãªã·ã¹ãã ãšäºææ§ã®ããTF GraphDef ãã©ãŒãããã«å€æããããšã§ããã©ãããã©ãŒã éã§ã®ããã©ãŒãã³ã¹ãåäžãããããšãã§ããŸãã
ã€ã³ã¹ããŒã«
å¿ èŠãªããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯ã以äžãå®è¡ããïŒ
ã€ã³ã¹ããŒã«ããã»ã¹ã«é¢ãã詳现ãªèª¬æãšãã¹ããã©ã¯ãã£ã¹ã«ã€ããŠã¯ãUltralytics ã€ã³ã¹ããŒã«ã¬ã€ããã芧ãã ãããYOLO11 ã«å¿ èŠãªããã±ãŒãžãã€ã³ã¹ããŒã«ããéã«ãäœããã®åé¡ãçºçããå Žåã¯ã解決çããã³ãã«ã€ããŠãããããåé¡ã¬ã€ããåç §ããŠãã ããã
䜿çšæ¹æ³
䜿ãæ¹ã®èª¬æã«å ¥ãåã«ãUltralytics YOLO11 ã®å šã¢ãã«ããšã¯ã¹ããŒãã«å¯Ÿå¿ããŠããããšã確èªããŠãããŸããã ã
䜿çšæ¹æ³
from ultralytics import YOLO
# Load the YOLO11 model
model = YOLO("yolo11n.pt")
# Export the model to TF GraphDef format
model.export(format="pb") # creates 'yolo11n.pb'
# Load the exported TF GraphDef model
tf_graphdef_model = YOLO("yolo11n.pb")
# Run inference
results = tf_graphdef_model("https://ultralytics.com/images/bus.jpg")
ãµããŒããããŠãããšã¯ã¹ããŒããªãã·ã§ã³ã®è©³çŽ°ã«ã€ããŠã¯ãUltralytics é 眮ãªãã·ã§ã³ã®ããã¥ã¡ã³ãããŒãžãåç §ããŠãã ããã
ãšã¯ã¹ããŒããããYOLO11 TF GraphDef ã¢ãã«ã®å±é
YOLO11 ã¢ãã«ãTF GraphDef ãã©ãŒãããã«ãšã¯ã¹ããŒããããã次ã®ã¹ãããã¯ãããã€ã§ããTF GraphDef ã¢ãã«ãå®è¡ããããã®æåã®ã¹ããããšããŠæšå¥šãããã®ã¯ãYOLO("model.pb") ã¡ãœããã䜿çšããããšã§ãã
ããããTF GraphDef ã¢ãã«ã®å±éã«é¢ãã詳现ã¯ã以äžã®ãªãœãŒã¹ãã芧ãã ããïŒ
-
TensorFlow ãµãŒãã¹:TensorFlow Servingã«é¢ããã¬ã€ãã§ãæ¬çªç°å¢ã§æ©æ¢°åŠç¿ã¢ãã«ãå¹ççã«ãããã€ããŠæäŸããæ¹æ³ãæããŠãããã
-
TensorFlow ã©ã€ã:ãã®ããŒãžã§ã¯ãTensorFlow Liteã䜿çšããŠãæ©æ¢°åŠç¿ã¢ãã«ãããã€ã¹äžã§ã®æšè«ã«æé©åããã圢åŒã«å€æããæ¹æ³ã«ã€ããŠèª¬æããŸãã
-
TensorFlow.js:Webã¢ããªã±ãŒã·ã§ã³ã§äœ¿çšããããã«ãTensorFlow ãŸã㯠Keras ã¢ãã«ãTensorFlow.js ãã©ãŒãããã«å€æããæ¹æ³ãæããã¢ãã«å€æã¬ã€ãã
æŠèŠ
ãã®ã¬ã€ãã§ã¯ãUltralytics YOLO11 ã¢ãã«ãTF GraphDef ãã©ãŒãããã«ãšã¯ã¹ããŒãããæ¹æ³ã«ã€ããŠèª¬æããŸãããããããããšã§ãæé©åãããYOLO11 ã¢ãã«ãããŸããŸãªç°å¢ã«æè»ã«å±éããããšãã§ããŸãã
䜿ãæ¹ã®è©³çŽ°ã«ã€ããŠã¯ãTF GraphDef å ¬åŒããã¥ã¡ã³ããã芧ãã ããã
Ultralytics YOLO11 ãä»ã®ãã©ãããã©ãŒã ããã¬ãŒã ã¯ãŒã¯ãšçµ±åããããã®è©³çŽ°æ å ±ã«ã€ããŠã¯ãçµ±åã¬ã€ãã®ããŒãžãå¿ããã«ãã§ãã¯ããŠãã ãããããªãã®ãããžã§ã¯ãã§YOLO11 ãæ倧éã«æŽ»çšããããã®çŽ æŽããããªãœãŒã¹ãæŽå¯ããããŸãã
ããããã質å
YOLO11 ã¢ãã«ãTF GraphDef 圢åŒã«ãšã¯ã¹ããŒãããã«ã¯ã©ãããã°ããã§ããïŒ
Ultralytics YOLO11 ã¢ãã«ãTensorFlow GraphDef (TF GraphDef ) ãã©ãŒãããã«ã·ãŒã ã¬ã¹ã«ãšã¯ã¹ããŒãããããšãã§ããŸãããã®ãã©ãŒãããã¯ãã¢ãã«ã®ã·ãªã¢ã©ã€ãºãããããã©ãããã©ãŒã ã«äŸåããªãè¡šçŸãæäŸããã¢ãã€ã«ãWebã®ãããªæ§ã ãªç°å¢ã§ã®å±éã«çæ³çã§ããYOLO11 ã¢ãã«ãTF GraphDef ã«ãšã¯ã¹ããŒãããã«ã¯ã以äžã®æé ã«åŸããŸãïŒ
䜿çšæ¹æ³
from ultralytics import YOLO
# Load the YOLO11 model
model = YOLO("yolo11n.pt")
# Export the model to TF GraphDef format
model.export(format="pb") # creates 'yolo11n.pb'
# Load the exported TF GraphDef model
tf_graphdef_model = YOLO("yolo11n.pb")
# Run inference
results = tf_graphdef_model("https://ultralytics.com/images/bus.jpg")
ããŸããŸãªãšã¯ã¹ããŒããªãã·ã§ã³ã®è©³çŽ°ã«ã€ããŠã¯ãã¢ãã«ã®ãšã¯ã¹ããŒãã«é¢ããUltralytics ã®ããã¥ã¡ã³ããã芧ãã ããã
YOLO11 ã¢ãã«å±éã«TF GraphDef ã䜿çšããã¡ãªããã¯äœã§ããïŒ
YOLO11 ã¢ãã«ãTF GraphDef ãã©ãŒãããã«ãšã¯ã¹ããŒããããšã以äžã®ãããªè€æ°ã®å©ç¹ããããŸãïŒ
- ãã©ãããã©ãŒã éäŸå:TF GraphDef ã¯ãã©ãããã©ãŒã ã«äŸåããªããã©ãŒããããæäŸããã¢ãã€ã«ããŠã§ããã©ãŠã¶ãå«ãæ§ã ãªç°å¢ã§ã®ã¢ãã«ã®å±éãå¯èœã«ããŸãã
- æé©åïŒãã®ãã©ãŒãããã¯ãå®æ°ã®æãããã¿ãéååãã°ã©ãå€æãªã©ãå®è¡å¹çãé«ããã¡ã¢ãªäœ¿çšéãåæžããããã€ãã®æé©åãå¯èœã«ããã
- ããŒããŠã§ã¢ã¢ã¯ã»ã©ã¬ãŒã·ã§ã³ïŒTF GraphDef ãã©ãŒãããã®ã¢ãã«ã¯ãGPUãTPUãAIããããªã©ã®ããŒããŠã§ã¢ã¢ã¯ã»ã©ã¬ãŒã¿ã掻çšããŠããã©ãŒãã³ã¹ãåäžãããããšãã§ããŸãã
TF GraphDef ã®ã»ã¯ã·ã§ã³ãã芧ãã ããã
ä»ã®ç©äœæ€åºã¢ãã«ã§ã¯ãªããUltralytics YOLO11 ã
Ultralytics YOLO11 YOLOv5 ãYOLOv7ã®ãããªä»ã®ã¢ãã«ãšæ¯èŒãããšãæ°å€ãã®å©ç¹ããããäž»ãªå©ç¹ã¯ä»¥äžã®éãïŒ
- æå 端ã®æ§èœïŒYOLO11 ã¯ããªã¢ã«ã¿ã€ã ã®ç©äœæ€åºãã»ã°ã¡ã³ããŒã·ã§ã³ãåé¡ã«åè¶ããé床ãšç²ŸåºŠãæäŸããŸãã
- 䜿ããããïŒã¢ãã«ã®ãã¬ãŒãã³ã°ãæ€èšŒãäºæž¬ããšã¯ã¹ããŒãã®ããã®ãŠãŒã¶ãŒãã¬ã³ããªãŒãªAPIãåããŠãããåå¿è ããäžçŽè ãŸã§ã¢ã¯ã»ã¹å¯èœã§ãã
- å¹ åºãäºææ§ïŒONNX ãTensorRT ãCoreML ãTensorFlow ãå«ãè€æ°ã®ãšã¯ã¹ããŒã圢åŒããµããŒãããå€åœ©ãªå±éãªãã·ã§ã³ãæäŸããŸãã
詳ãã㯠YOLO11 ãã芧ãã ããã
TF GraphDef ã䜿ã£ãŠãYOLO11 ã®ã¢ãã«ãç¹å¥ãªããŒããŠã§ã¢ã«ãããã€ããã«ã¯ïŒ
YOLO11 ã¢ãã«ãTF GraphDef ãã©ãŒãããã«ãšã¯ã¹ããŒãããããšãæ§ã ãªå°çšããŒããŠã§ã¢ãã©ãããã©ãŒã ã«å±éããããšãã§ããŸãã代衚çãªå±éã·ããªãªã¯ä»¥äžã®ãšããã§ãïŒ
- TensorFlow ãµãŒãã³ã°æ¬çªç°å¢ã§ã®ã¹ã±ãŒã©ãã«ãªã¢ãã«å±éã«ã¯ãTensorFlow Servingã䜿çšãããã¢ãã«ç®¡çãšå¹ççãªãµãŒãã³ã°ããµããŒãããŸãã
- ã¢ãã€ã«ããã€ã¹ïŒTF GraphDef ã¢ãã«ãTensorFlow Lite ã«å€æããã¢ãã€ã«ããã³çµã¿èŸŒã¿ããã€ã¹çšã«æé©åããããšã§ãããã€ã¹äžã§ã®æšè«ãå¯èœã«ããã
- ãŠã§ããã©ãŠã¶ïŒTensorFlow.js ã䜿çšããŠã¢ãã«ããããã€ããWeb ã¢ããªã±ãŒã·ã§ã³ã®ã¯ã©ã€ã¢ã³ããµã€ãæšè«ãè¡ãã
- AIã¢ã¯ã»ã©ã¬ãŒã¿ïŒTPUãšã«ã¹ã¿ã AIãããã掻çšããŠæšè«ãå éã
詳现ã«ã€ããŠã¯ãé åãªãã·ã§ã³ã®ã»ã¯ã·ã§ã³ã確èªããŠãã ããã
YOLO11 ã¢ãã«ã®ãšã¯ã¹ããŒãäžã«ããããåé¡ã®è§£æ±ºçã¯ã©ãã«ãããŸããïŒ
YOLO11 ã¢ãã«ã®ãšã¯ã¹ããŒãã«é¢ããäžè¬çãªåé¡ã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°ã«ã€ããŠã¯ãUltralytics ãå æ¬çãªã¬ã€ããšãªãœãŒã¹ãæäŸããŠããŸããã€ã³ã¹ããŒã«ãŸãã¯ã¢ãã«ã®ãšã¯ã¹ããŒãäžã«åé¡ãçºçããå Žåã¯ã以äžãåç §ããŠãã ããïŒ
- å ±é課é¡ã¬ã€ã:ããããåé¡ã®è§£æ±ºçã玹ä»ã
- ã€ã³ã¹ããŒã«ã¬ã€ã:å¿ èŠãªããã±ãŒãžã®ã»ããã¢ãããã¹ããããã€ã¹ãããã§èª¬æããŸãã
ãããã®ãªãœãŒã¹ã¯ãYOLO11 ã¢ãã«ã®ãšã¯ã¹ããŒããšå±éã«é¢é£ããã»ãšãã©ã®åé¡ã解決ããã®ã«åœ¹ç«ã€ã¯ãã§ãã