Coder Social home page Coder Social logo

google-images-dataset's Introduction

google-images-dataset

This repository provides the necessary code to create your own Google Images Dataset in the form of an interactive Jupyter Notebook. Unlike other downloaders, to the best of my knowledge, this method respects Google's Terms of Service. To be able to run this tutorial you will need to have the latest version of the fastai library installed.

If using conda:

conda update conda
conda install -c fastai fastai

If using pip:

pip install fastai

Credits to Jeremy Howard as co-author and Adrian Rosenbrock's tutorial for inspiration.

google-images-dataset's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

google-images-dataset's Issues

b should have at least 2 dimensions, but has 1 dimensions instead

Get this error when I run the code --> data.show_batch(rows=3, figsize=(7,8))

RuntimeError: b should have at least 2 dimensions, but has 1 dimensions instead

This is complete error:
RuntimeError Traceback (most recent call last)
in
----> 1 data.show_batch(rows=3, figsize=(7,8))

~\Anaconda3\envs\py36\lib\site-packages\fastai\basic_data.py in show_batch(self, rows, ds_type, **kwargs)
158 def show_batch(self, rows:int=5, ds_type:DatasetType=DatasetType.Train, **kwargs)->None:
159 "Show a batch of data in ds_type on a few rows."
--> 160 x,y = self.one_batch(ds_type, True, True)
161 if self.train_ds.x._square_show: rows = rows ** 2
162 xs = [self.train_ds.x.reconstruct(grab_idx(x, i)) for i in range(rows)]

~\Anaconda3\envs\py36\lib\site-packages\fastai\basic_data.py in one_batch(self, ds_type, detach, denorm, cpu)
141 w = self.num_workers
142 self.num_workers = 0
--> 143 try: x,y = next(iter(dl))
144 finally: self.num_workers = w
145 if detach: x,y = to_detach(x,cpu=cpu),to_detach(y,cpu=cpu)

~\Anaconda3\envs\py36\lib\site-packages\fastai\basic_data.py in iter(self)
68 def iter(self):
69 "Process and returns items from DataLoader."
---> 70 for b in self.dl:
71 #y = b[1][0] if is_listy(b[1]) else b[1] # XXX: Why is this line here?
72 yield self.proc_batch(b)

~\Anaconda3\envs\py36\lib\site-packages\torch\utils\data\dataloader.py in next(self)
635 self.reorder_dict[idx] = batch
636 continue
--> 637 return self._process_next_batch(batch)
638
639 next = next # Python 2 compatibility

~\Anaconda3\envs\py36\lib\site-packages\torch\utils\data\dataloader.py in _process_next_batch(self, batch)
656 self._put_indices()
657 if isinstance(batch, ExceptionWrapper):
--> 658 raise batch.exc_type(batch.exc_msg)
659 return batch
660

RuntimeError: Traceback (most recent call last):
File "C:\Users\Garima\Anaconda3\envs\py36\lib\site-packages\torch\utils\data\dataloader.py", line 138, in _worker_loop
samples = collate_fn([dataset[i] for i in batch_indices])
File "C:\Users\Garima\Anaconda3\envs\py36\lib\site-packages\torch\utils\data\dataloader.py", line 138, in
samples = collate_fn([dataset[i] for i in batch_indices])
File "C:\Users\Garima\Anaconda3\envs\py36\lib\site-packages\fastai\data_block.py", line 526, in getitem
x = x.apply_tfms(self.tfms, **self.tfmargs)
File "C:\Users\Garima\Anaconda3\envs\py36\lib\site-packages\fastai\vision\image.py", line 113, in apply_tfms
else: x = tfm(x)
File "C:\Users\Garima\Anaconda3\envs\py36\lib\site-packages\fastai\vision\image.py", line 499, in call
return self.tfm(x, *args, **{**self.resolved, **kwargs}) if self.do_run else x
File "C:\Users\Garima\Anaconda3\envs\py36\lib\site-packages\fastai\vision\image.py", line 446, in call
if args: return self.calc(*args, **kwargs)
File "C:\Users\Garima\Anaconda3\envs\py36\lib\site-packages\fastai\vision\image.py", line 451, in calc
if self._wrap: return getattr(x, self._wrap)(self.func, *args, **kwargs)
File "C:\Users\Garima\Anaconda3\envs\py36\lib\site-packages\fastai\vision\image.py", line 167, in coord
self.flow = func(self.flow, *args, **kwargs)
File "C:\Users\Garima\Anaconda3\envs\py36\lib\site-packages\fastai\vision\transform.py", line 238, in _symmetric_warp
return _do_perspective_warp(c, targ_pts, invert)
File "C:\Users\Garima\Anaconda3\envs\py36\lib\site-packages\fastai\vision\transform.py", line 225, in _do_perspective_warp
return _apply_perspective(c, _find_coeffs(_orig_pts, targ_pts))
File "C:\Users\Garima\Anaconda3\envs\py36\lib\site-packages\fastai\vision\transform.py", line 206, in _find_coeffs
return torch.gesv(B,A)[0][:,0]
RuntimeError: b should have at least 2 dimensions, but has 1 dimensions instead

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.