创建自定义tf.dataset图像数据集

发布于 2025-02-09 02:53:34 字数 710 浏览 1 评论 0原文

https://www.tensorflow.org/datasets/add_dataset 此链接显示了如何创建自定义数据集。我已经尝试过,但是未能创建自己的数据集,

我在该文件夹中有一个文件夹“火车”和4个子文件夹,必须创建培训数据和标签。 我使用的

cd path/to/my/project/datasets/
tfds new my_dataset  # Create `my_dataset/my_dataset.py` template files
# [...] Manually modify `my_dataset/my_dataset.py` to implement your dataset.
cd my_dataset/
tfds build  # Download and prepare the dataset to `~/tensorflow_datasets/`

一个文件夹由程序my_dataset创建/带有三个.py PGMS 我没有得到数据和标签。我不知道要指定数据集的路径。

致电我的数据集

ds = tfds.load('my_dataset')

NB:我的目的是使用谢谢您

https://www.tensorflow.org/datasets/add_dataset
This Link shows how to create custom dataset. I have tried with this, but failed to create my own dataset

I have a folder 'Train' and 4 sub folders in that folder and have to create training data and label.
The code I used

cd path/to/my/project/datasets/
tfds new my_dataset  # Create `my_dataset/my_dataset.py` template files
# [...] Manually modify `my_dataset/my_dataset.py` to implement your dataset.
cd my_dataset/
tfds build  # Download and prepare the dataset to `~/tensorflow_datasets/`

one folder created by the program my_dataset/ with three .py pgms
I didn't get the data and label.I don't know where the path of my dataset to specify.

NB: My purpose is to call my dataset using

ds = tfds.load('my_dataset')

Thank You

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忆梦 2025-02-16 02:53:34

此代码之后,

cd path/to/my/project/datasets/
tfds new my_dataset

您必须修改生成的Python文件以包括您的数据。 (修改所有待办事线)

给定教程不太清楚。一个简单的image_classification示例可以清除所有问题。我也被困在注册数据集步骤上。

如果找到解决方案,我会在这里通知您。

After this code

cd path/to/my/project/datasets/
tfds new my_dataset

You have to modify the python files generated to include your data. (modify all TODO lines)

Given tutorial is not very clear. One simple example for image_classification could have cleared all the issues. I am also stuck on registering dataset step.

I will notify you here If I find a solution.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文