quiltdata / open-images

Build an example image classifier using Google Open Images V4
https://medium.freecodecamp.org/how-to-classify-photos-in-600-classes-using-nine-million-open-images-65847da1a319
32 stars 17 forks source link

getting all ready to run #2

Open AndrzejBandurski opened 5 years ago

AndrzejBandurski commented 5 years ago

Hi, following your installation description I'm getting an error running the last python code

Traceback (most recent call last): File "", line 1, in File "/home/andrzej/anaconda3/envs/quilt-open-images-dev/lib/python3.6/site-packages/t4/packages.py", line 343, in install pkg = cls.browse(name=name, registry=registry, top_hash=top_hash) File "/home/andrzej/anaconda3/envs/quilt-open-images-dev/lib/python3.6/site-packages/t4/packages.py", line 375, in browse return cls._from_path(pkg_path) File "/home/andrzej/anaconda3/envs/quilt-open-images-dev/lib/python3.6/site-packages/t4/packages.py", line 393, in _from_path with open(parse_file_url(src_url)) as open_file: IsADirectoryError: [Errno 21] Is a directory: '/home/andrzej/machineLearning/open-images/quilt/open_images/.quilt/packages/./'

python openimager.py also quits with an error

Traceback (most recent call last): File "openimager.py", line 89, in download(categories) File "openimager.py", line 35, in download label_map = dict(class_names.set_index('LabelName').loc[categories, 'LabelID'] File "/home/andrzej/anaconda3/envs/quilt-open-images-dev/lib/python3.6/site-packages/pandas/core/indexing.py", line 1418, in getitem return self._getitem_tuple(key) File "/home/andrzej/anaconda3/envs/quilt-open-images-dev/lib/python3.6/site-packages/pandas/core/indexing.py", line 805, in _getitem_tuple return self._getitem_lowerdim(tup) File "/home/andrzej/anaconda3/envs/quilt-open-images-dev/lib/python3.6/site-packages/pandas/core/indexing.py", line 961, in _getitem_lowerdim return getattr(section, self.name)[new_key] File "/home/andrzej/anaconda3/envs/quilt-open-images-dev/lib/python3.6/site-packages/pandas/core/indexing.py", line 1424, in getitem return self._getitem_axis(maybe_callable, axis=axis) File "/home/andrzej/anaconda3/envs/quilt-open-images-dev/lib/python3.6/site-packages/pandas/core/indexing.py", line 1839, in _getitem_axis return self._getitem_iterable(key, axis=axis) File "/home/andrzej/anaconda3/envs/quilt-open-images-dev/lib/python3.6/site-packages/pandas/core/indexing.py", line 1133, in _getitem_iterable keyarr, indexer = self._get_listlike_indexer(key, axis, raise_missing=False) File "/home/andrzej/anaconda3/envs/quilt-open-images-dev/lib/python3.6/site-packages/pandas/core/indexing.py", line 1092, in _get_listlike_indexer keyarr, indexer, o._get_axis_number(axis), raise_missing=raise_missing File "/home/andrzej/anaconda3/envs/quilt-open-images-dev/lib/python3.6/site-packages/pandas/core/indexing.py", line 1177, in _validate_read_indexer key=key, axis=self.obj._get_axis_name(axis) KeyError: "None of [Index(['Sandwiches', 'Hamburgers'], dtype='object', name='LabelName')] are in the [index]"

any thoughts on that ?? thanks!

ResidentMario commented 5 years ago

The first error is due to a breaking API change that changed the order of the arguments to t4.Package.install. The updated instructions in the documentation should explain how the parameterization now works (note that the name of the Python package has changed as well, from t4 to quilt3—e.g. pip install -U quilt3 is the new install path).

The second error is due to Google transparently updating from V4 to V5 of the dataset, which introduced breaking changes in the names of things. The install script has not been updated and still uses the old asset paths and label names. For more information, see #1.

Hopefully a future update to this repo will fix these issues.