Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activeloopai Hub section added #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,41 @@ A convolutional neural network for German traffic sign image classification.
The images are photos of traffic signs. The images are classified into 43 classes. The training set contains 39209 labeled images and the test set contains 12630 images. Labels for the test set are not published.
See more details [here](http://benchmark.ini.rub.de/?section=gtsrb&subsection=dataset).


### How to use with Hub
A simple way of using this dataset is with [Activeloop](https://activeloop.ai)'s python package [Hub](https://github.com/activeloopai/Hub)!

First, run `pip install hub` (or `pip3 install hub`).

```python
import hub
ds = hub.load('hub://activeloop/gtsrb-train')

#check out the first image and all of its details!
import matplotlib.pyplot as plt
plt.imshow(ds.images[0].numpy())
plt.title(f" boxes : {ds.boxes[0].numpy()},labels : {ds.labels[0].numpy()},shapes : {ds.shapes[0].numpy()},colors : {ds.colors[0].numpy()}")
plt.show()

# train a model in pytorch
for sample in ds.pytorch():
# ... model code here ...

# train a model in tensorflow
for sample in ds.tensorflow():
# ... model code here ...
```
available tensors can be shown by printing dataset:

```python
print(ds)

# prints: Dataset(path='hub://activeloop/gtsrb-train', read_only=True, tensors=['images', 'boxes', 'labels', 'shapes', 'colors'])
```


For more information, check out the [hub documentation](https://docs.activeloop.ai/).

# Model #
[ResNet-34](https://arxiv.org/abs/1512.03385) pretrained on ImageNet dataset, then finetuned on GTSRB dataset.

Expand Down