Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
|
| 5 |
+
Example images to be used with the Trashify object detection demo.
|
| 6 |
+
|
| 7 |
+
See link to the demo: [https://huggingface.co/spaces/mrdbourke/trashify_demo_v4](https://huggingface.co/spaces/mrdbourke/trashify_demo_v4)
|
| 8 |
+
|
| 9 |
+
Example usage:
|
| 10 |
+
|
| 11 |
+
```python
|
| 12 |
+
from datasets import load_dataset
|
| 13 |
+
|
| 14 |
+
trashify_examples = load_dataset("mrdbourke/trashify_examples")
|
| 15 |
+
trashify_examples
|
| 16 |
+
```
|
| 17 |
+
|
| 18 |
+
Save images to file:
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
for i, sample in enumerate(trashify_examples["train"]):
|
| 22 |
+
save_path = f"../demos/trashify_object_detector/trashify_examples/trashify_example_{i+1}.jpeg"
|
| 23 |
+
print(f"[INFO] Saving image to: {save_path}")
|
| 24 |
+
sample["image"].save(save_path)
|
| 25 |
+
```
|