加载(导入)现有的非样本CVAT项目作为数据集

发布于 2025-02-10 14:02:56 字数 1883 浏览 2 评论 0 原文

我正在尝试

import fiftyone as fo
dataset = fo.load_dataset("import_test")

存在的项目并具有这样的项目名称,我以前在CVAT中创建了这个项目。

此类呼叫在 https://githubhelp.com/voxel51/voxel51/fiftyone/sissues/issues/1611

但我得到了

valueerror:未找到数据集'import_test'

ValueError:文档中 : 示例和其他问题:

  1. > https://colab.research.google.com/github/voxel51/fiftyone-examples/blob/master/master/examples/pytorch_detection_ipynb#scrollto = 5crndnsrwdpt /Question/69797248/uploading-large-dataset-from-fiftyone-to-cvat“>上传大型数据集从fiftyone到CVAT
  2. https://medium.com/voxel51/loading-open-images-images-images-images-images-v6--custom-custom-datasets------------------------------------fiftyone -18B5334851C3

示例fiftyone数据集的用法仅使用:

dataset = foz.load_zoo_dataset("...")

它适合我作为CVAT服务器连接检查,但不满足我的工作需求。 在 使用本地计算机存储的数据集,

dataset = fo.Dataset.from_dir("...")

我可以加载已经创建的已经创建的项目最初从服务器中创建的项目, 除了CVAT的项目名称外,应该使用什么参数? 是可能的还是最初是五十一个数据集?

I am trying

import fiftyone as fo
dataset = fo.load_dataset("import_test")

the project which exists and have such project name, I've created in CVAT before.

Such call was used in https://githubhelp.com/voxel51/fiftyone/issues/1611

but I am getting

ValueError: Dataset 'import_test' not found

In the documentation:
https://voxel51.com/docs/fiftyone/integrations/cvat.html
examples and other questions:

  1. https://colab.research.google.com/github/voxel51/fiftyone-examples/blob/master/examples/pytorch_detection_training.ipynb#scrollTo=5crNDNsRWdPT
  2. Uploading large dataset from FiftyOne to CVAT
  3. https://medium.com/voxel51/loading-open-images-v6-and-custom-datasets-with-fiftyone-18b5334851c3

there are only usage of sample fiftyone dataet:

dataset = foz.load_zoo_dataset("...")

which works correctly for me as CVAT server connection check, but don't suit my work needs.
In
https://towardsdatascience.com/tools-to-annotate-and-improve-computer-vision-datasets-f9b99cdb0e04
using local machine stored dataset

dataset = fo.Dataset.from_dir("...")

Can I load already created project initially created in CVAT from server,
what argument is supposed to be used except it's CVAT's name of project?
Is it possible or it has to be initially fiftyone dataset?

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

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

发布评论

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

评论(1

执笏见 2025-02-17 14:02:56

是的,您可以使用

请注意,为了使用 fo.load_dataset(),数据集需要在fiftyone中存在。您可以在

dataset = fo.Dataset("my-dataset-name")

然后,您可以调用 import_annotations(),提供一个项目名称,并选择为 data_path export_media = true 以下载从您的项目到本地目录以及项目中的所有标签,然后将它们导入您刚创建的数据集。

dataset = fo.Dataset("my-dataset-name")
fouc.import_annotations(
    dataset,
    project_name=project_name,
    data_path="/tmp/cvat_import",
    download_media=True,
)

如果您的媒体已经存在于磁盘中,请参见链接的示例,以提供 data_map 将CVAT文件名映射到本地磁盘上的媒体文件。

Yes, you can use the fiftyone.utils.cvat.import_annotations() method to import labels that are already in a CVAT project or task into a FiftyOne Dataset.

Note that in order to use fo.load_dataset(), the dataset needs to already exist in FiftyOne. You can initialize an empty dataset like so as shown in the import annotations example:

dataset = fo.Dataset("my-dataset-name")

Then, you can call import_annotations(), providing a project name and optionally a data_path and export_media=True to download all of the media from your project to a local directory as well as all of the labels in your project, then import them into the dataset you just created.

dataset = fo.Dataset("my-dataset-name")
fouc.import_annotations(
    dataset,
    project_name=project_name,
    data_path="/tmp/cvat_import",
    download_media=True,
)

If your media already exists in disk, then see the linked example for how to provide a data_map mapping the CVAT filename to filepath of the media on the local disk.

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