如何解决如何创建与TuriCreate兼容的SFrame以进行对象检测任务
我试图创建一个包含图像和边界框坐标的app_controllers:
resource: ../../../src/Controller/HomeController.php
type: annotation
host: '{domain}'
defaults:
domain: '%domain%'
requirements:
domain: '%domain%|www.%domain%'
,以便使用SFrame
执行对象检测。
我已经通过IBM Cloud Annotations创建了自己的数据集,并以TuriCreate
格式导出。当我跑步时:
CreateML
我得到:
[{'label':'xyz'... | 8be1172e-44bb-4084-917f-db ....
这不是要求的格式。确认正在运行以下代码:
usage_data = tc.SFrame.read_json("annotations.json")
我明白了:
data = tc.SFrame.read_json("annotations.json")
train_data,test_data = data.random_split(0.75)
model = tc.object_detector.create(train_data)
predictions = model.predict(test_data)
我想知道:
- 是否以
ToolkitError: No "feature" column specified and no column with expected type "image" is found. "datasets" consists of columns with types: list,str.
格式正确导出数据? - 我可以使用
CreateML
来读取此类数据吗?
解决方法
您需要从images文件夹创建一个SFrame,然后将其加入到注释SFrame中,例如:
index
只需确保每个注释的路径都与imagesSFrame中的路径完全匹配。下面是我的csv格式:
imagesSFrame = turicreate.image_analysis.load_images('imagesFolder/')
combinedSFrame = images.join(annotationsSFrame)
path,annotation,imagesFolder/image1.png,[{'label': 'dog','coordinates': {'height': 118,'width': 240,'x': 155,'y': 129}}]
将允许您检查imagesSFrame内部的路径
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。