trashify_examples / README.md
mrdbourke's picture
Update README.md
0d11985 verified
---
license: apache-2.0
---
Example images to be used with the Trashify object detection demo.
See link to the demo: [https://huggingface.co/spaces/mrdbourke/trashify_demo_v4](https://huggingface.co/spaces/mrdbourke/trashify_demo_v4)
Example usage:
```python
from datasets import load_dataset
trashify_examples = load_dataset("mrdbourke/trashify_examples")
trashify_examples
```
Save images to file:
```python
for i, sample in enumerate(trashify_examples["train"]):
save_path = f"../demos/trashify_object_detector/trashify_examples/trashify_example_{i+1}.jpeg"
print(f"[INFO] Saving image to: {save_path}")
sample["image"].save(save_path)
```