0

I am trying to import data from a fiftyone dataset. I have some code that does this.

The code:

!pip install "opencv-python-headless<4.3"
!pip install --upgrade pip setuptools wheel
!pip install fiftyone

import fiftyone as fo
import fiftyone.zoo as foz
import numpy as np
import tensorflow as tf

dataset = foz.load_zoo_dataset(
              "open-images-v6",
              split="train",
              label_types=["detections", "classifications"],
              classes=["Airplane","Cat", "Dog"],
              max_samples=2500,
          )

session = fo.launch_app(dataset)

This code works fine on Google colab. I would like to be able to load the data on my local computer as well.

I have done the pip install comands in my command prompt:

D:\Users\Student>pip install "opencv-python-headless<4.3"

D:\Users\Student>pip install --upgrade pip setuptools wheel

D:\Users\Student>pip install fiftyone

Here is the result of trying to run the code in my python terminal:

>>> import fiftyone as fo
>>> import fiftyone.zoo as foz
>>> import numpy as np
>>> import tensorflow as tf
>>> dataset = foz.load_zoo_dataset(
              "open-images-v6",
              split="train",
              label_types=["detections", "classifications"],
              classes=["Airplane","Cat", "Dog"],
              max_samples=2500,
          )
Downloading split 'train' to 'D:\Users\Student\fiftyone\open-images-v6\train' if necessary
Uncaught exception
Traceback (most recent call last):
  File "D:\Users\Student\AppData\Local\Programs\Python\Python38\lib\idlelib\run.py", line 559, in runcode
    exec(code, self.locals)
  File "<pyshell#10>", line 1, in <module>
  File "D:\Users\Student\AppData\Local\Programs\Python\Python38\lib\site-packages\fiftyone\zoo\datasets\__init__.py", line 197, in load_zoo_dataset
    info, dataset_dir = download_zoo_dataset(
  File "D:\Users\Student\AppData\Local\Programs\Python\Python38\lib\site-packages\fiftyone\zoo\datasets\__init__.py", line 116, in download_zoo_dataset
    return zoo_dataset.download_and_prepare(
  File "D:\Users\Student\AppData\Local\Programs\Python\Python38\lib\site-packages\fiftyone\zoo\datasets\__init__.py", line 1004, in download_and_prepare
    ) = self._download_and_prepare(split_dir, scratch_dir, split)
  File "D:\Users\Student\AppData\Local\Programs\Python\Python38\lib\site-packages\fiftyone\zoo\datasets\base.py", line 2238, in _download_and_prepare
    num_samples, classes, downloaded = fouo.download_open_images_split(
  File "D:\Users\Student\AppData\Local\Programs\Python\Python38\lib\site-packages\fiftyone\utils\openimages.py", line 534, in download_open_images_split
    image_ids, _did_download = _load_all_image_ids(
  File "D:\Users\Student\AppData\Local\Programs\Python\Python38\lib\site-packages\fiftyone\utils\openimages.py", line 1526, in _load_all_image_ids
    csv_data = _parse_csv(csv_filepath)
  File "D:\Users\Student\AppData\Local\Programs\Python\Python38\lib\site-packages\fiftyone\utils\openimages.py", line 815, in _parse_csv
    dialect = csv.Sniffer().sniff(csvfile.read(10240))
  File "D:\Users\Student\AppData\Local\Programs\Python\Python38\lib\csv.py", line 187, in sniff
    raise Error("Could not determine delimiter")
_csv.Error: Could not determine delimiter
>>> 

What do I need to do in order to use this data locally?

Programmer S
  • 429
  • 7
  • 21

0 Answers0