OpenImages V6下载

新工具:Fiftyone

网址

可以采用colab运行程序,点击即可:

OpenImages V6下载
完整代码:
!pip install opencv-python-headless==4.5.4.60
!pip install fiftyone

!pip install tensorflow torch torchvision umap-learn
!pip install ipywidgets>=7.5
import fiftyone as fo
import fiftyone.zoo as foz
连接谷歌云盘
from google.colab import drive
drive.mount('/content/drive')
其中一个示例
dataset = foz.load_zoo_dataset(
    "open-images-v6",
    split="validation",
    label_types=["segmentations", "detections"],
    # classes = ,
    # max_samples=100,
    seed=51,
    shuffle=True,
    dataset_dir="/content/drive/MyDrive/Colab Notebooks/openiamges/",  # 指定下载的数据集保存的路径,尽量不要随意更改,这是保存原始图片的路径,
    dataset_name="open-images",
    # numexpr_max_threads=20,
)

更多示例参考官方示例。

OpenImages V6下载

参数详解:

  • label_types – a list of label types to load. The supported values are (“detections”, “classifications”, “segmentations”, “relationships”). By default, all available labels types will be loaded. Specifying [] will load only the images
  • classes – a list of classes of interest. If specified, only samples with at least one object, segmentation, or image-level label in the specified classes will be downloaded
  • attrs – a list of attributes of interest. If specified, only download samples if they contain at least one attribute in attrs or one class in classes (only applicable when label_types contains “relationships”)
  • load_hierarchy – whether to load the class hierarchy into dataset.info[“hierarchy”]
  • image_ids – an array of specific image IDs to download
  • image_ids_file – a path to a .txt, .csv, or .json file containing image IDs to download

In addition, like all other zoo datasets, you can specify:

  • max_samples – the maximum number of samples to load
  • shuffle – whether to randomly chose which samples to load if max_samples is given
  • seed – a random seed to use when shuffling

Original: https://blog.csdn.net/qq_45033722/article/details/124161999
Author: 大笨钟47
Title: OpenImages V6下载

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/681708/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球