Fiftyone Download Coco Dataset

0 views
Skip to first unread message

Perry Barillari

unread,
Jan 18, 2024, 10:00:39 AM1/18/24
to bioscarwhatscof

In addition, FiftyOne provides parameters that can be used to efficientlydownload specific subsets of the COCO dataset, allowing you to quickly exploredifferent slices of the dataset without downloading the entire split.

fiftyone download coco dataset


Download File https://t.co/f6OTudS6GE



max_samples (None): a maximum number of samples to load per split. Iflabel_types and/or classes are also specified, first priority willbe given to samples that contain all of the specified label types and/orclasses, followed by samples that contain at least one of the specifiedlabels types or classes. The actual number of samples loaded may be lessthan this maximum value if the dataset does not contain sufficient samplesmatching your requirements

Alternatively, when importing labeled datasets in formats such asCOCO, you may find it more natural toprovide the data_path and labels_path parameters to independentlyspecify the location of the source media on disk and the annotations filecontaining the labels to import:

Alternatively, when importing labeled datasets in formats such asCOCO, you may find it more natural toprovide the data_path and labels_path parameters via thekwargs option to independentlyspecify the location of the source media on disk and the annotations filecontaining the labels to import:

Each supported dataset type is represented by a subclass offiftyone.types.Dataset, which is used by the Python library and CLI torefer to the corresponding dataset format when reading the dataset from disk.

You can also independently specify the locations of the labels and the rootdirectory containing the corresponding media files by providing thelabels_path and data_path parameters rather than dataset_dir:

When the above command is executed, the images in the TFRecords will bewritten to the provided images_dir, which is required because FiftyOnedatasets must make their images available as individual files on disk.

When the above command is executed, the images in the TFRecords will bewritten to the provided IMAGES_DIR, which is required because FiftyOnedatasets must make their images available as individual files on disk.

If you have an existing dataset and corresponding model predictions stored inCOCO format, then you can useadd_coco_labels() to convenientlyadd the labels to the dataset. The example below demonstrates a round-tripexport and then re-import of both images-and-labels and labels-only data inCOCO format:

See this page for a fulldescription of the possible format of dataset.yaml. In particular, thedataset may contain one or more splits with arbitrary names, as the specificsplit being imported or exported is specified by the split argument tofiftyone.utils.yolo.YOLOv5DatasetImporter. Also, dataset.yaml can belocated outside of as long as the optional path is provided.

When the above command is executed, the images in the TFRecords will bewritten to the provided IMAGES_DIR, which is required because FiftyOnedatasets must make their images available as invididual files on disk.

You can also independently specify the locations of the masks and the rootdirectory containing the corresponding media files by providing thelabels_path and data_path parameters rather than dataset_dir:

By default, all attributes in the DICOM files discoverable viapydicom.dataset.Dataset.dir() with supported types are loadedinto sample-level fields, but you can select only specific attributes bypassing the optional keywords argument.

The dataset will contain a GeoLocation field whosepoint attribute contains the(longitude, latitude) coordinates of each image center and whosepolygon attribute containsthe (longitude, latitude) coordinates of the corners of the image (clockwise,starting from the top-left corner).

where metadata.json is a JSON file containing metadata associated with thedataset, samples.json is a JSON file containing a serialized representationof the samples in the dataset, annotations/ contains any serializedAnnotationResults, brain/ contains any serialized BrainResults, andevaluations/ contains any serialized EvaluationResults.

If you performed a FiftyOneDataset exportusing the rel_dir parameter to strip a common prefix from the media filepathsin the dataset, then simply include the rel_dir parameter when importing backinto FiftyOne to prepend the appropriate prefix to each media path:

Exporting in FiftyOneDataset format usingthe export_media=False and rel_dir parameters is a convenient way totransfer datasets between work environments, since this enables you tostore the media files wherever you wish in each environment and then simplyprovide the appropriate rel_dir value as shown above when importing thedataset into FiftyOne in a new environment.

Thehas_dataset_infoproperty of the importer allows it to declare whether itsget_dataset_info()method should be called after all samples have been imported to retrievedataset-level information to store on the FiftyOne dataset. Seethis section for more information.

The videos and their corresponding labels in the dataset are iterativelyloaded by invoking the__next__()method of the importer. In particular, sample-level labels for the videomay be returned in a label value (which may contain a single Labelvalue or a dictionary that maps field names to labels), and frame-levellabels may be returned in a frames dictionary that maps frame numbersto dictionaries of field names and labels.

Thehas_dataset_infoproperty of the importer allows it to declare whether itsget_dataset_info()method should be called after all samples have been imported to retrieve a dictof dataset-level information to store in theinfo property of the dataset.

The primary function of the Dataset subclasses is to define theDatasetImporter that should be used to read instances of the dataset fromdisk and the DatasetExporter that should be used to write instances of thedataset to disk.

a dict mapping keys to fiftyone.core.labels.Label classes.In this case, the importer will return label dictionaries with keysand value-types specified by this dictionary. Not all keys need bepresent in the imported labels

a dict mapping keys to fiftyone.core.labels.Label classes.In this case, the exporter can handle label dictionaries withvalue-types specified by this dictionary. Not all keys need bepresent in the exported label dicts

By convention, this method must be optional; i.e., if it is not calledbefore the first call to export_sample(), then the exporter mustmake do without any information about thefiftyone.core.collections.SampleCollection (which may not beavailable, for example, if the samples being exported are not stored ina collection).

f448fe82f3
Reply all
Reply to author
Forward
0 new messages