IBM Watsonxã䜿ã£ãYOLO11 ã¢ãã«ã®ãã¬ãŒãã³ã°ã®ã¹ãããã»ãã€ã»ã¹ãããã»ã¬ã€ã
ä»æ¥ãã¹ã±ãŒã©ãã«ãªã³ã³ãã¥ãŒã¿ã»ããžã§ã³ã»ãœãªã¥ãŒã·ã§ã³ã¯äžè¬çã«ãªãã€ã€ãããããžã¥ã¢ã«ã»ããŒã¿ã®æ±ãæ¹ãå€é©ããŠããããã®å¥œäŸãIBM Watsonxã§ãAIã¢ãã«ã®éçºãå±éã管çãç°¡çŽ åããå é²çãªAIããã³ããŒã¿ã»ãã©ãããã©ãŒã ã ãIBM Watsonxã¯ãAIã©ã€ããµã€ã¯ã«å šäœã®ããã®å®å šãªã¹ã€ãŒããšãIBMã¯ã©ãŠãã»ãµãŒãã¹ãšã®ã·ãŒã ã¬ã¹ãªçµ±åãæäŸããŸãã
IBM Watsonx ã䜿çšããŠUltralytics YOLO11 ã¢ãã«ããã¬ãŒãã³ã°ããããšãã§ããŸããIBM Watsonx ã¯ãå¹ççãªã¢ãã«ã»ãã¬ãŒãã³ã°ãç¹å®ã®ã¿ã¹ã¯ã®ããã®åŸ®èª¿æŽãããã³å ç¢ãªããŒã«ãšãŠãŒã¶ãŒã»ãã¬ã³ããªãŒãªã»ããã¢ããã«ããã¢ãã«ã»ããã©ãŒãã³ã¹ã®åäžã«é¢å¿ã®ããäŒæ¥ã«ãšã£ãŠãè¯ãéžæè¢ã§ãããã®ã¬ã€ãã§ã¯ãIBM Watsonx ã䜿ã£ãŠYOLO11 ããã¬ãŒãã³ã°ããããã»ã¹ã説æããŸããç°å¢ã®ã»ããã¢ãããããã¬ãŒãã³ã°ããã¢ãã«ã®è©äŸ¡ãŸã§ããã¹ãŠãç¶²çŸ ããŸãããã£ããå§ããŸãããïŒ
IBM Watsonxãšã¯ïŒ
Watsonxã¯ãåçšãžã§ãã¬ãŒãã£ãAIãšç§åŠããŒã¿ã®ããã«èšèšãããIBMã®ã¯ã©ãŠãããŒã¹ã®ãã©ãããã©ãŒã ã§ããIBM Watsonxã®3ã€ã®ã³ã³ããŒãã³ãã§ããwatsonx.aiãwatsonx.dataãwatsonx.governanceãäžäœãšãªãããšã³ãããŒãšã³ãã§ä¿¡é Œã§ããAIãã©ãããã©ãŒã ãæ§ç¯ããããžãã¹èª²é¡ã®è§£æ±ºãç®çãšããAIãããžã§ã¯ããå éãããããšãã§ãããæ©æ¢°åŠç¿ã¢ãã«ã®æ§ç¯ããã¬ãŒãã³ã°ãå±éã®ããã®åŒ·åãªããŒã«ãæäŸããããŸããŸãªããŒã¿ãœãŒã¹ãšã®æ¥ç¶ã容æã«ããã
ãŠãŒã¶ãŒãã¬ã³ããªãŒãªã€ã³ã¿ãŒãã§ãŒã¹ãšã³ã©ãã¬ãŒã·ã§ã³æ©èœã«ãããéçºããã»ã¹ãåçåããå¹ççãªã¢ãã«ç®¡çãšå±éãæ¯æŽããŸããã³ã³ãã¥ãŒã¿ãŒã»ããžã§ã³ãäºæž¬åæãèªç¶èšèªåŠçããã®ä»ã® AI ã¢ããªã±ãŒã·ã§ã³ã®ãããã«ãããŠããIBM Watsonx ã¯ã€ãããŒã·ã§ã³ã®æšé²ã«å¿ èŠãªããŒã«ãšãµããŒããæäŸããŸãã
IBM Watsonxã®äž»ãªç¹åŸŽ
IBM Watsonxã¯ãwatsonx.aiãwatsonx.dataãwatsonx.governanceã®3ã€ã®äž»èŠã³ã³ããŒãã³ãã§æ§æãããŠãããåã³ã³ããŒãã³ãã¯ãAIãšããŒã¿ç®¡çã®ç°ãªãåŽé¢ã«å¯Ÿå¿ããæ©èœãæäŸããã詳ããèŠãŠãããã
ã¯ããœã³x.ai
Watsonx.aiã¯ãAIéçºã®ããã®åŒ·åãªããŒã«ãæäŸããIBMããµããŒãããã«ã¹ã¿ã ã¢ãã«ãLlama 3ã®ãããªãµãŒãããŒãã£ãŒã¢ãã«ãIBMç¬èªã®Graniteã¢ãã«ãžã®ã¢ã¯ã»ã¹ãæäŸããŸããAIããã³ãããå®éšããããã®ããã³ããã»ã©ããã©ãã«ä»ãããŒã¿ã§ã¢ãã«ã»ããã©ãŒãã³ã¹ãåäžãããããã®ãã¥ãŒãã³ã°ã»ã¹ã¿ãžãªããžã§ãã¬ãŒãã£ãAIã¢ããªã±ãŒã·ã§ã³éçºãç°¡çŽ åããããã®ãããŒã»ãšã³ãžã³ãªã©ãå«ãŸããããŸããAIã¢ãã«ã®ã©ã€ããµã€ã¯ã«ãèªååããããŸããŸãªAPIãã©ã€ãã©ãªã«æ¥ç¶ããããã®å æ¬çãªããŒã«ãæäŸããã
ã¯ããœã³XããŒã¿
Watsonx.dataã¯ãIBM Storage Fusion HCIãšã®çµ±åã«ãããã¯ã©ãŠããšãªã³ãã¬ãã¹ã®äž¡æ¹ã®å°å ¥ããµããŒãããããŠãŒã¶ãŒãã¬ã³ããªãŒãªã³ã³ãœãŒã«ã¯ãç°å¢ãåããããŒã¿ãžã®äžå çãªã¢ã¯ã»ã¹ãæäŸããäžè¬çãªSQLã§ããŒã¿æ¢çŽ¢ã容æã«ããŸããPrestoãSparkã®ãããªå¹ççãªã¯ãšãªãŒã»ãšã³ãžã³ã§ã¯ãŒã¯ããŒããæé©åããAIã掻çšããã»ãã³ãã£ãã¯ã»ã¬ã€ã€ãŒã§ããŒã¿æŽå¯ãå éããAIé¢é£æ§ã®ããã®ãã¯ã¿ãŒã»ããŒã¿ããŒã¹ãæèŒããã¢ããªãã£ã¯ã¹ãšAIããŒã¿ãç°¡åã«å ±æã§ãããªãŒãã³ã»ããŒã¿ã»ãã©ãŒãããããµããŒãããã
ã¯ããœã³xã¬ããã³ã¹
Watsonx.governanceã¯ãèŠå¶ã®å€æŽãèªåçã«ç¹å®ããããªã·ãŒãå®æœããããšã§ãã³ã³ãã©ã€ã¢ã³ã¹ã容æã«ããŸããèŠä»¶ã瀟å ã®ãªã¹ã¯ããŒã¿ã«ãªã³ã¯ããææ°ã®AIãã¡ã¯ãã·ãŒããæäŸããŸãããã®ãã©ãããã©ãŒã ã¯ããã€ã¢ã¹ãããªãããªã©ã®åé¡ãæ€åºããããã®ã¢ã©ãŒããšããŒã«ã§ãªã¹ã¯ç®¡çãæ¯æŽããŸãããŸããAIã©ã€ããµã€ã¯ã«ã®ã¢ãã¿ãªã³ã°ãšææžåãèªååããã¢ãã«ã€ã³ãã³ããªã§AIéçºãæŽçãã䜿ããããããã·ã¥ããŒããšã¬ããŒãããŒã«ã§ã³ã©ãã¬ãŒã·ã§ã³ã匷åããŸãã
IBM Watsonxã䜿ã£ãYOLO11 ã®ãã¬ãŒãã³ã°æ¹æ³
IBM Watsonxã䜿çšããŠãYOLO11 ã¢ãã«ã»ãã¬ãŒãã³ã°ã®ã¯ãŒã¯ãããŒãå éããããšãã§ããŸãã
åææ¡ä»¶
watsonx.aiãããžã§ã¯ããäœæããã«ã¯IBM Cloudã¢ã«ãŠã³ããå¿ èŠã§ãããŒã¿ã»ãããããŒãããã«ã¯Kaggleã¢ã«ãŠã³ããå¿ èŠã§ãã
ã¹ããã1ïŒç°å¢ãæŽãã
ãŸããJupyter Notebookã䜿çšããããã«IBMã¢ã«ãŠã³ããèšå®ããå¿ èŠããããŸããIBM Cloudã¢ã«ãŠã³ãã䜿ã£ãŠwatsonx.aiã«ãã°ã€ã³ããŸãã
次ã«ãwatsonx.aiãããžã§ã¯ããš Jupyter Notebookãäœæããã
ãããããšãããŒã¿ã»ãããããŒãããããã®ããŒãããã¯ç°å¢ãéããŸãããã®ãã¥ãŒããªã¢ã«ã®ã³ãŒãã䜿ã£ãŠãç°¡åãªç©äœæ€åºã¢ãã«ã®åŠç¿ã¿ã¹ã¯ã«åãçµãããšãã§ããŸãã
ã¹ããã2ïŒé¢é£ã©ã€ãã©ãªã®ã€ã³ã¹ããŒã«ãšã€ã³ããŒã
次ã«ãå¿ èŠãªPython ã©ã€ãã©ãªãã€ã³ã¹ããŒã«ããŠã€ã³ããŒãããã
ã€ã³ã¹ããŒã«
ã€ã³ã¹ããŒã«ããã»ã¹ã«é¢ãã詳现ãªèª¬æãšãã¹ããã©ã¯ãã£ã¹ã«ã€ããŠã¯ãUltralytics ã€ã³ã¹ããŒã«ã¬ã€ããã芧ãã ãããYOLO11 ã«å¿ èŠãªããã±ãŒãžãã€ã³ã¹ããŒã«ããéã«ãäœããã®åé¡ãçºçããå Žåã¯ã解決çããã³ãã«ã€ããŠãããããåé¡ã¬ã€ããåç §ããŠãã ããã
ãã®åŸãå¿ èŠãªããã±ãŒãžãã€ã³ããŒãããããšãã§ããã
é¢é£ã©ã€ãã©ãªã®ã€ã³ããŒã
ã¹ããã3ïŒããŒã¿ã®ããŒã
ãã®ãã¥ãŒããªã¢ã«ã§ã¯ãKaggle ã§å ¬éãããŠããæµ·æŽãã¿ã®ããŒã¿ã»ããã䜿çšããŸãããã®ããŒã¿ã»ããã䜿ã£ãŠãYOLO11 ã¢ãã«ãã«ã¹ã¿ã ã»ãã¬ãŒãã³ã°ããæ°Žäžç»åã®ãŽããšçç©åŠçç©äœãæ€åºã»åé¡ããŸãã
ããŒã¿ã»ãããKaggle APIã䜿ã£ãŠçŽæ¥ããŒãããã¯ã«ããŒãããããšãã§ããŸãããŸããç¡æã®Kaggleã¢ã«ãŠã³ããäœæããŸããã¢ã«ãŠã³ããäœæããããAPIããŒãçæããå¿ èŠããããŸããããŒã®çææ¹æ³ã¯Kaggle APIããã¥ã¡ã³ãã®"API credentials "ã«èšèŒãããŠããŸãã
Kaggleã®ãŠãŒã¶ãŒåãšAPIããŒãã³ããŒããŠä»¥äžã®ã³ãŒãã«ããŒã¹ãããŠãã ããããããŠã³ãŒããå®è¡ã㊠API ãã€ã³ã¹ããŒã«ããããŒã¿ã»ããã Watsonx ã«ããŒãããŸãã
Kaggleãã€ã³ã¹ããŒã«ããããããŒã¿ã»ãããWatsonxã«ããŒãããã
ããŒã¿ãèªã¿èŸŒã
# Replace "username" string with your username
os.environ["KAGGLE_USERNAME"] = "username"
# Replace "apiKey" string with your key
os.environ["KAGGLE_KEY"] = "apiKey"
# Load dataset
os.system("kaggle datasets download atiqishrak/trash-dataset-icra19 --unzip")
# Store working directory path as work_dir
work_dir = os.getcwd()
# Print work_dir path
print(os.getcwd())
# Print work_dir contents
print(os.listdir(f"{work_dir}"))
# Print trash_ICRA19 subdirectory contents
print(os.listdir(f"{work_dir}/trash_ICRA19"))
ããŒã¿ã»ãããããŒãããåŸãäœæ¥ãã£ã¬ã¯ããªãå°å·ããŠä¿åããããŸãã"trash_ICRA19 "ããŒã¿ã»ãããæ£ããããŒããããããšã確èªããããã«ãäœæ¥ãã£ã¬ã¯ããªã®å 容ãããªã³ãããã
ãã£ã¬ã¯ããªã®äžèº«ã®äžã« "trash_ICRA19 "ãããã°ãæ£åžžã«ããŒããããŠããŸãã次ã®3ã€ã®ãã¡ã€ã«ïŒãã©ã«ããŒãèŠããã¯ãã§ãã config.yaml
ãã¡ã€ã«ã¯ videos_for_testing
ãã£ã¬ã¯ããªãš dataset
ãã£ã¬ã¯ããªã«ä¿åãããŸããããã§ã¯ videos_for_testing
ãã£ã¬ã¯ããªããåé€ããŠãã ããã
config.yamlãã¡ã€ã«ãšdatasetãã£ã¬ã¯ããªã®å 容ã䜿çšããŠããªããžã§ã¯ãæ€åºã¢ãã«ãåŠç¿ããŸãã以äžã¯ãæµ·ãã¿ã®ããŒã¿ã»ããããã®ãµã³ãã«ç»åã§ãã
ã¹ããã4ïŒããŒã¿ã®ååŠç
幞ããªããšã«ãæµ·ãã¿ã®ããŒã¿ã»ããã«å«ãŸãããã¹ãŠã®ã©ãã«ã¯ããã§ã«YOLO .txtãã¡ã€ã«ãšããŠãã©ãŒããããããŠãããããããã¢ãã«ãç»åãšã©ãã«ãåŠçããããããããã«ãç»åãšã©ãã«ã®ãã£ã¬ã¯ããªæ§é ãæŽçããå¿ èŠããããçŸåšãèªã¿èŸŒãŸããããŒã¿ã»ããã®ãã£ã¬ã¯ããªã¯æ¬¡ã®ãããªæ§é ã«ãªã£ãŠããïŒ
ããããYOLO ãããã©ã«ãã§ã¯ãtrain/val/testã®ã¹ããªããå ã®ãµããã£ã¬ã¯ããªã«ãå¥ã ã®ç»åãšã©ãã«ãå¿ èŠã§ããããã£ã¬ã¯ããªã以äžã®ãããªæ§é ã«åç·šæããå¿ èŠãããïŒ
ããŒã¿ã»ããã»ãã£ã¬ã¯ããªãåç·šæããã«ã¯ã以äžã®ã¹ã¯ãªãããå®è¡ããã°ããïŒ
ããŒã¿ã®ååŠç
# Function to reorganize dir
def organize_files(directory):
for subdir in ["train", "test", "val"]:
subdir_path = os.path.join(directory, subdir)
if not os.path.exists(subdir_path):
continue
images_dir = os.path.join(subdir_path, "images")
labels_dir = os.path.join(subdir_path, "labels")
# Create image and label subdirs if non-existent
os.makedirs(images_dir, exist_ok=True)
os.makedirs(labels_dir, exist_ok=True)
# Move images and labels to respective subdirs
for filename in os.listdir(subdir_path):
if filename.endswith(".txt"):
shutil.move(os.path.join(subdir_path, filename), os.path.join(labels_dir, filename))
elif filename.endswith(".jpg") or filename.endswith(".png") or filename.endswith(".jpeg"):
shutil.move(os.path.join(subdir_path, filename), os.path.join(images_dir, filename))
# Delete .xml files
elif filename.endswith(".xml"):
os.remove(os.path.join(subdir_path, filename))
if __name__ == "__main__":
directory = f"{work_dir}/trash_ICRA19/dataset"
organize_files(directory)
次ã«ãããŒã¿ã»ããã®.yamlãã¡ã€ã«ãä¿®æ£ããå¿ èŠããããããã.yamlãã¡ã€ã«ã§äœ¿çšããèšå®ã§ããã¯ã©ã¹IDçªå·ã¯0ããå§ãŸããŸãïŒ
path: /path/to/dataset/directory # root directory for dataset
train: train/images # train images subdirectory
val: train/images # validation images subdirectory
test: test/images # test images subdirectory
# Classes
names:
0: plastic
1: bio
2: rov
以äžã®ã¹ã¯ãªãããå®è¡ããŠãconfig.yamlã®çŸåšã®å 容ãåé€ããæ°ããããŒã¿ã»ããã®ãã£ã¬ã¯ããªæ§é ãåæ ããäžèšã®å 容ã«çœ®ãæããŸãã4è¡ç®ã®ã«ãŒãã»ãã£ã¬ã¯ããªã»ãã¹ã®work_dirã®éšåããå ã»ã©ååŸããèªåã®äœæ¥ãã£ã¬ã¯ããªã»ãã¹ã«çœ®ãæããŠãã ãããtrainãvalãtestãµããã£ã¬ã¯ããªã®å®çŸ©ã¯ãã®ãŸãŸã«ããŠãããŠãã ããããŸããã³ãŒã23è¡ç®ã®{work_dir}ã¯å€æŽããªãã§ãã ããã
.yamlãã¡ã€ã«ãç·šéãã
# Contents of new confg.yaml file
def update_yaml_file(file_path):
data = {
"path": "work_dir/trash_ICRA19/dataset",
"train": "train/images",
"val": "train/images",
"test": "test/images",
"names": {0: "plastic", 1: "bio", 2: "rov"},
}
# Ensures the "names" list appears after the sub/directories
names_data = data.pop("names")
with open(file_path, "w") as yaml_file:
yaml.dump(data, yaml_file)
yaml_file.write("\n")
yaml.dump({"names": names_data}, yaml_file)
if __name__ == "__main__":
file_path = f"{work_dir}/trash_ICRA19/config.yaml" # .yaml file path
update_yaml_file(file_path)
print(f"{file_path} updated successfully.")
ã¹ããã5ïŒYOLO11 ã¢ãã«ã®èšç·Ž
以äžã®ã³ãã³ãã©ã€ã³ã»ã³ãŒããå®è¡ããŠãäºåã«èšç·Žãããããã©ã«ãã®YOLO11 ã¢ãã«ã埮調æŽããã
YOLO11 ã¢ãã«ã®ãã¬ãŒãã³ã°
ã¢ãã«ãã¬ãŒãã³ã°ã³ãã³ãã®ãã©ã¡ãŒã¿ãŒã詳ããèŠãŠã¿ããïŒ
- task: æå®ãããYOLO ã¢ãã«ãšããŒã¿ã»ããã䜿çšããã³ã³ãã¥ãŒã¿ããžã§ã³ã¿ã¹ã¯ãæå®ããŸãã
- ã¢ãŒãïŒæå®ããã¢ãã«ãšããŒã¿ãããŒãããç®çã瀺ããæã ã¯ã¢ãã«ããã¬ãŒãã³ã°ããŠããã®ã§ã"train "ã«èšå®ãããŠãããåŸã§ã¢ãã«ã®æ§èœããã¹ããããšãã¯ã"predict "ã«èšå®ããŸãã
- epochs:YOLO11 ãããŒã¿ã»ããå šäœãééããåæ°ãåºåããŸãã
- ãããïŒæ°å€ã¯ãã¬ãŒãã³ã°ããããµã€ãºãèŠå®ãããããããšã¯ãã¢ãã«ããã©ã¡ãŒã¿ãæŽæ°ãããŸã§ã«åŠçããç»åã®æ°ã§ããã
- lr0: ã¢ãã«ã®åæåŠç¿çãæå®ããã
- ããããïŒã¢ãã«ã®ãã¬ãŒãã³ã°ãšè©äŸ¡ã®ã¡ããªã¯ã¹ã®ãããããçæããŠä¿åãããããYOLO ã
ã¢ãã«ãã¬ãŒãã³ã°ããã»ã¹ãšãã¹ããã©ã¯ãã£ã¹ã®è©³çŽ°ã«ã€ããŠã¯ãYOLO11 ã¢ãã«ãã¬ãŒãã³ã°ã¬ã€ããåç §ããŠãã ããããã®ã¬ã€ãã¯ãå®éšãæ倧éã«æŽ»çšããYOLO11 ãå¹æçã«äœ¿çšããã®ã«åœ¹ç«ã¡ãŸãã
ã¹ããã6ïŒã¢ãã«ã®ãã¹ã
ããã§æšè«ãå®è¡ãã埮調æŽããã¢ãã«ã®æ§èœããã¹ãããããšãã§ããïŒ
YOLO11 ã¢ãã«ã®ãã¹ã
ãã®ç°¡åãªã¹ã¯ãªããã¯ããã¹ãã»ããã®åç»åã®äºæž¬ã©ãã«ãçæããããã«äºæž¬ãããããŠã³ãã£ã³ã°ããã¯ã¹ãå ã®ç»åã®äžã«éããæ°ããåºåç»åãã¡ã€ã«ãçæããŸãã
åç»åã®äºæž¬.txtã©ãã«ã¯ã以äžã®æ¹æ³ã§ä¿åãããŸãã save_txt=True
åŒæ°ã§æå®ããããŠã³ãã£ã³ã°ããã¯ã¹ããªãŒããŒã¬ã€ããåºåç»å㯠save=True
ãšããè°è«ã«ãªãã
ãã©ã¡ãŒã¿ conf=0.5
ã¯ãä¿¡é ŒåºŠã50%æªæºã®äºæž¬ã¯ãã¹ãŠç¡èŠããããã«ã¢ãã«ã«éç¥ããŸãã
æåŸã«ã iou=.5
ã¯ã50%以äžã®éãªããããåãã¯ã©ã¹ã®ããã¯ã¹ãç¡èŠããããã«ã¢ãã«ã«æ瀺ããŸããããã¯ãåããªããžã§ã¯ãã«å¯ŸããŠçæãããæœåšçãªéè€ããã¯ã¹ãæžããã®ã«åœ¹ç«ã¡ãŸãã
äºæž¬ãããããŠã³ãã£ã³ã°ã»ããã¯ã¹ã»ãªãŒããŒã¬ã€ã§ç»åãããŒãããŠãç§ãã¡ã®ã¢ãã«ãäžæ¡ãã®ç»åã§ã©ã®ããã«æ©èœããããèŠãããšãã§ããŸãã
ãã£ã¹ãã¬ã€äºæ³
äžã®ã³ãŒãã¯ããã¹ãã»ããã®10æã®ç»åããäºæž¬ãããããŠã³ãã£ã³ã°ããã¯ã¹ãšãšãã«ãã¯ã©ã¹åã®ã©ãã«ãšä¿¡é ŒåºŠãšãšãã«è¡šç€ºããã
ã¹ããã7ïŒã¢ãã«ã®è©äŸ¡
åã¯ã©ã¹ã§ã®ã¢ãã«ã®ç²ŸåºŠãšæ³èµ·ã®å¯èŠåãäœæã§ããŸãããããã®å¯èŠåã¯ãtrain ãã©ã«ãã®äžã®ããŒã ãã£ã¬ã¯ããªã«ä¿åãããŸãã粟床ã¹ã³ã¢ã¯P_curve.pngã«è¡šç€ºãããŸãïŒ
ã°ã©ãã¯ãäºæž¬ã«å¯Ÿããã¢ãã«ã®ä¿¡é ŒåºŠãé«ããªãã«ã€ããŠã粟床ãææ°é¢æ°çã«åäžããããšã瀺ããŠãããããããã¢ãã«ã®ç²ŸåºŠã¯ã2ãšããã¯åŸã®ããä¿¡é Œã¬ãã«ã§ã¯ãŸã å¹³æºåãããŠããŸããã
ãªã³ãŒã«ã°ã©ãïŒR_curve.pngïŒã¯éåŸåã瀺ãïŒ
粟床ãšã¯ç°ãªããæ³èµ·ã¯å察æ¹åã«åããããäœãä¿¡é ŒåºŠã®ã€ã³ã¹ã¿ã³ã¹ã§ã¯ããé«ãæ³èµ·ã瀺ããããé«ãä¿¡é ŒåºŠã®ã€ã³ã¹ã¿ã³ã¹ã§ã¯ããäœãæ³èµ·ã瀺ããããã¯ãåé¡ã¢ãã«ã®ç²ŸåºŠãšãªã³ãŒã«ã®ãã¬ãŒããªãã®é©åãªäŸã§ãã
ã¹ããã8ïŒã€ã³ã¿ãŒã»ã¯ã·ã§ã³ã»ãªãŒããŒã»ãŠããªã³ã®èšç®
äºæž¬ãããããŠã³ãã£ã³ã°ããã¯ã¹ãšåããªããžã§ã¯ãã®ã°ã©ã³ããã¥ã«ãŒã¹ã®ããŠã³ãã£ã³ã°ããã¯ã¹ã®éã®IoUãèšç®ããããšã§ãäºæž¬ç²ŸåºŠã枬å®ããããšãã§ããŸãã詳ããã¯IBMã®ãã¥ãŒããªã¢ã«ãtrainingYOLO11ããã芧ãã ããã
æŠèŠ
IBM Watsonx ã®äž»ãªæ©èœãšãIBM Watsonx ã䜿çšããŠYOLO11 ã¢ãã«ããã¬ãŒãã³ã°ããæ¹æ³ã«ã€ããŠèª¬æããŸããããŸããIBM Watsonxãã¢ãã«æ§ç¯ãããŒã¿ç®¡çãããã³ã³ã³ãã©ã€ã¢ã³ã¹ã®ããã®é«åºŠãªããŒã«ã«ãã£ãŠãã©ã®ããã«AIã¯ãŒã¯ãããŒã匷åã§ãããã確èªããŸããã
䜿çšæ¹æ³ã®è©³çŽ°ã«ã€ããŠã¯ãIBM Watsonx å ¬åŒããã¥ã¡ã³ããã芧ãã ããã
ãŸããUltralytics ã®çµ±åã¬ã€ãããŒãžã§ãããŸããŸãªãšããµã€ãã£ã³ã°ãªçµ±åã«ã€ããŠè©³ããã芧ãã ããã
ããããã質å
IBM Watsonx ã䜿ã£ãŠYOLO11 ã¢ãã«ããã¬ãŒãã³ã°ããã«ã¯ïŒ
IBM Watsonx ã䜿ã£ãŠYOLO11 ã¢ãã«ãèšç·Žããã«ã¯ã以äžã®æé ã«åŸãïŒ
- ç°å¢ãã»ããã¢ããããIBM Cloud ã¢ã«ãŠã³ããäœæããWatsonx.ai ãããžã§ã¯ããã»ããã¢ããããŸããã³ãŒãã£ã³ã°ç°å¢ã«ã¯ Jupyter Notebook ã䜿çšããŸãã
- ã©ã€ãã©ãªã®ã€ã³ã¹ããŒã«:ãªã©ã®å¿
èŠãªã©ã€ãã©ãªãã€ã³ã¹ããŒã«ããã
torch
,opencv
ãããŠultralytics
. - ããŒã¿ã®ããŒãKaggle API ã䜿çšããŠããŒã¿ã»ããã Watsonx ã«ããŒãããŸãã
- ããŒã¿ã®ååŠç:ããŒã¿ã»ãããå¿
èŠãªãã£ã¬ã¯ããªæ§é ã«æŽçããŠ
.yaml
èšå®ãã¡ã€ã«ã - ã¢ãã«ãèšç·Žãã:YOLO ã³ãã³ãã©ã€ã³ã€ã³ã¿ãŒãã§ã€ã¹ã䜿çšããŠã以äžã®ãããªç¹å®ã®ãã©ã¡ãŒã¿ã§ã¢ãã«ããã¬ãŒãã³ã°ããŸãã
epochs
,batch size
ãããŠlearning rate
. - ãã¹ããšè©äŸ¡ïŒæšè«ãå®è¡ããŠã¢ãã«ããã¹ãããprecisionãrecallã®ãããªã¡ããªã¯ã¹ã䜿ã£ãŠãã®ããã©ãŒãã³ã¹ãè©äŸ¡ããã
詳ããæé ã«ã€ããŠã¯ãYOLO11 ã¢ãã«ã»ãã¬ãŒãã³ã°ã»ã¬ã€ãããåç §ãã ããã
AIã¢ãã«ã»ãã¬ãŒãã³ã°ã®ããã®IBM Watsonxã®äž»ãªç¹åŸŽã¯äœã§ããïŒ
IBM Watsonxã¯ãAIã¢ãã«ã®ãã¬ãŒãã³ã°ã«ããã€ãã®äž»èŠãªæ©èœãæäŸããŠããïŒ
- Watsonx.aiïŒIBM ããµããŒãããã«ã¹ã¿ã ã¢ãã«ã Llama 3 ã®ãããªãµãŒãããŒãã£ãŒã¢ãã«ãžã®ã¢ã¯ã»ã¹ãå«ããAI éçºã®ããã®ããŒã«ãæäŸãå æ¬çãªAIã©ã€ããµã€ã¯ã«ç®¡çã®ããã®Prompt LabãTuning StudioãFlows Engineãå«ãã
- Watsonx.dataïŒã¯ã©ãŠããšãªã³ãã¬ãã¹ã®å°å ¥ããµããŒãããäžå åãããããŒã¿ã¢ã¯ã»ã¹ãPrestoãSparkã®ãããªå¹ççãªã¯ãšãªãŒãšã³ãžã³ãAIãæèŒããã»ãã³ãã£ãã¯ã¬ã€ã€ãŒãæäŸã
- Watsonx.governanceïŒã³ã³ãã©ã€ã¢ã³ã¹ãèªååããã¢ã©ãŒãã§ãªã¹ã¯ã管çãããã€ã¢ã¹ãããªãããªã©ã®åé¡ãæ€åºããããŒã«ãæäŸããŸããã³ã©ãã¬ãŒã·ã§ã³ã®ããã®ããã·ã¥ããŒããã¬ããŒãã£ã³ã°ããŒã«ãå«ãŸããŠããã
詳现ã«ã€ããŠã¯ãIBM Watsonx å ¬åŒããã¥ã¡ã³ããã芧ãã ããã
Ultralytics YOLO11 ã¢ãã«ã®ãã¬ãŒãã³ã°ã« IBM Watsonx ã䜿ãã¹ãçç±ã¯ïŒ
IBM Watsonxã¯ãAIã®ã©ã€ããµã€ã¯ã«ãåçåããå æ¬çãªããŒã«çŸ€ã«ãããUltralytics YOLO11 ã¢ãã«ã®ãã¬ãŒãã³ã°ã«æé©ã§ããäž»ãªå©ç¹ã¯ä»¥äžã®éãïŒ
- ã¹ã±ãŒã©ããªãã£ïŒIBM Cloud ãµãŒãã¹ã§ã¢ãã«ã»ãã¬ãŒãã³ã°ãç°¡åã«æ¡åŒµã§ããŸãã
- çµ±åïŒæ§ã ãªããŒã¿ãœãŒã¹ãAPIãšã·ãŒã ã¬ã¹ã«çµ±åã
- ãŠãŒã¶ãŒãã¬ã³ããªãŒãªã€ã³ã¿ãŒãã§ãŒã¹ïŒå調çã§çŽæçãªã€ã³ã¿ãŒãã§ã€ã¹ã«ãããéçºããã»ã¹ãç°¡çŽ åããŸãã
- é«åºŠãªããŒã«ïŒPrompt LabãTuning StudioãFlows Engineãªã©ãã¢ãã«ã®ããã©ãŒãã³ã¹ãåäžããã匷åãªããŒã«ãå©çšã§ããŸãã
IBM Watsonx Ultralytics YOLO11ããã³ IBM Watsonx ã䜿çšããŠã¢ãã«ããã¬ãŒãã³ã°ããæ¹æ³ã«ã€ããŠã¯ãã€ã³ãã°ã¬ãŒã·ã§ã³ã»ã¬ã€ããã芧ãã ããã
IBM Watsonx ã®YOLO11 ãã¬ãŒãã³ã°çšã«ããŒã¿ã»ãããååŠçããã«ã¯ïŒ
IBM Watsonx ã®YOLO11 ãã¬ãŒãã³ã°çšã«ããŒã¿ã»ãããååŠçããïŒ
- ãã£ã¬ã¯ããªãæŽçããïŒããŒã¿ã»ãããYOLO ãã£ã¬ã¯ããªæ§é ã«åŸããtrain/val/testã®åå²ã®äžã«ç»åãšã©ãã«çšã®å¥ã ã®ãµããã£ã¬ã¯ããªãããããšã確èªããã
- .yamlãã¡ã€ã«ã®æŽæ°:ãå€æŽããã
.yaml
èšå®ãã¡ã€ã«ã«æ°ãããã£ã¬ã¯ããªæ§é ãšã¯ã©ã¹åãåæ ãããŸãã - ååŠçã¹ã¯ãªããã®å®è¡:Python ã¹ã¯ãªããã䜿çšããŠãããŒã¿ã»ãããåç·šæããæŽæ°ããŸãã
.yaml
ãã¡ã€ã«ãäœæããã
ããã«ãããŒã¿ã»ãããæŽçããããã®ãµã³ãã«ã»ã¹ã¯ãªãããããïŒ
import os
import shutil
def organize_files(directory):
for subdir in ["train", "test", "val"]:
subdir_path = os.path.join(directory, subdir)
if not os.path.exists(subdir_path):
continue
images_dir = os.path.join(subdir_path, "images")
labels_dir = os.path.join(subdir_path, "labels")
os.makedirs(images_dir, exist_ok=True)
os.makedirs(labels_dir, exist_ok=True)
for filename in os.listdir(subdir_path):
if filename.endswith(".txt"):
shutil.move(os.path.join(subdir_path, filename), os.path.join(labels_dir, filename))
elif filename.endswith(".jpg") or filename.endswith(".png") or filename.endswith(".jpeg"):
shutil.move(os.path.join(subdir_path, filename), os.path.join(images_dir, filename))
if __name__ == "__main__":
directory = f"{work_dir}/trash_ICRA19/dataset"
organize_files(directory)
詳现ã¯ããŒã¿ååŠçã¬ã€ããåç §ã
IBM Watsonx ã§YOLO11 ã¢ãã«ããã¬ãŒãã³ã°ããããã®åææ¡ä»¶ã¯äœã§ããïŒ
IBM Watsonx ã§YOLO11 ã¢ãã«ã®ãã¬ãŒãã³ã°ãéå§ããåã«ã以äžã®åææ¡ä»¶ãæã£ãŠããããšã確èªããŠãã ããïŒ
- IBM Cloud ã¢ã«ãŠã³ãïŒWatsonx.ai ã«ã¢ã¯ã»ã¹ããã«ã¯ãIBM Cloud ã§ã¢ã«ãŠã³ããäœæããŸãã
- Kaggleã¢ã«ãŠã³ãïŒããŒã¿ã»ãããèªã¿èŸŒãã«ã¯ãKaggleã¢ã«ãŠã³ããšAPIããŒãå¿ èŠã§ãã
- Jupyter NotebookïŒWatsonx.ai å ã« Jupyter Notebook ç°å¢ãã»ããã¢ããããã³ãŒãã£ã³ã°ãšã¢ãã«åŠç¿ãè¡ãã
ç°å¢èšå®ã®è©³çŽ°ã«ã€ããŠã¯ãUltralytics ã€ã³ã¹ããŒã«ã¬ã€ããã芧ãã ããã