alibaba / pipcook

Machine learning platform for Web developers
https://alibaba.github.io/pipcook/
Apache License 2.0
2.55k stars 209 forks source link

请问我的数据集在本地的话datasource要怎么设置呢? #907

Closed tiancaidiyibu closed 2 years ago

tiancaidiyibu commented 2 years ago

"datasource": "https://cdn.jsdelivr.net/gh/imgcook/pipcook-script@b1f834c/scripts/image-classification/build/datasource.js?url=Users/adminx/Desktop/Ikki-study/iconcook/iconData/imgs.zip",

FeelyChau commented 2 years ago
{
  "datasource": "https://cdn.jsdelivr.net/gh/imgcook/pipcook-script@b1f834c/scripts/image-classification/build/datasource.js?url=file:///Users/adminx/Desktop/Ikki-study/iconcook/iconData/imgs.zip"
}

试试这个

tiancaidiyibu commented 2 years ago

运行报这个错:run pipeline error: No data found in dataset pool.

这是我的pipeline设置 ` {

"specVersion": "2.0",
"type": "ImageClassification",
"datasource": "https://cdn.jsdelivr.net/gh/imgcook/pipcook-script@b1f834c/scripts/image-classification/build/datasource.js?url=file:///Users/adminx/Desktop/Ikki-study/iconcook/iconData/imgs.zip",
"dataflow": [
  "https://cdn.jsdelivr.net/gh/imgcook/pipcook-script@b1f834c/scripts/image-classification/build/dataflow.js?size=224&size=224"
],
"model": "https://cdn.jsdelivr.net/gh/imgcook/pipcook-script@b1f834c/scripts/image-classification/build/model.js",
"options": {
  "framework": "tfjs@3.8",
  "train": {
    "epochs": 10
  }
}

} 数据集结构是

FeelyChau commented 2 years ago

运行时加上 -d 参数,发一下运行日志,如果方便的话,最好发一个简化的数据集文件,我这边可以 debug 一下。

tiancaidiyibu commented 2 years ago

imgs.zip

FeelyChau commented 2 years ago

imgs.zip

抱歉,如果是本地数据源的话,要指向目录,所以改成:

{
  "datasource": "https://cdn.jsdelivr.net/gh/imgcook/pipcook-script@b1f834c/scripts/image-classification/build/datasource.js?url=file:///Users/adminx/Desktop/Ikki-study/iconcook/iconData/imgs/"
}

就好了。

tiancaidiyibu commented 2 years ago

image

FeelyChau commented 2 years ago

image

分类模型需要至少两个类别的图片,这个错误应该是数据源只包含了一个类别。

tiancaidiyibu commented 2 years ago

谢谢,已经搞定了。