Datasets:
Tasks:
Object Detection
Size Categories:
1K<n<10K
Source Datasets:
original
Tags:
other-object-detection
PierreLeveau
commited on
Commit
•
af27ffa
1
Parent(s):
53d470d
add 4th class
Browse files- plastic_in_river.py +4 -5
plastic_in_river.py
CHANGED
@@ -7,8 +7,8 @@ from PIL import Image
|
|
7 |
|
8 |
|
9 |
_DESCRIPTION = """
|
10 |
-
This dataset contains photos of rivers on which there may be waste. The waste items are annotated
|
11 |
-
through bounding boxes, and are assigned to one of the 4 following categories: plastic bottle, plastic bag,
|
12 |
another plastic waste, or non-plastic waste. Note that some photos may not contain any waste.
|
13 |
"""
|
14 |
|
@@ -41,13 +41,13 @@ class PlasticInRiver(datasets.GeneratorBasedBuilder):
|
|
41 |
"image": datasets.Image(),
|
42 |
"litter": datasets.Sequence(
|
43 |
{
|
44 |
-
"label": datasets.ClassLabel(num_classes=
|
45 |
"bbox": datasets.Sequence(datasets.Value("float32"), length=4),
|
46 |
}
|
47 |
)
|
48 |
}
|
49 |
)
|
50 |
-
|
51 |
return datasets.DatasetInfo(
|
52 |
description=_DESCRIPTION,
|
53 |
features=features,
|
@@ -90,4 +90,3 @@ class PlasticInRiver(datasets.GeneratorBasedBuilder):
|
|
90 |
})
|
91 |
|
92 |
yield idx, data
|
93 |
-
|
7 |
|
8 |
|
9 |
_DESCRIPTION = """
|
10 |
+
This dataset contains photos of rivers on which there may be waste. The waste items are annotated
|
11 |
+
through bounding boxes, and are assigned to one of the 4 following categories: plastic bottle, plastic bag,
|
12 |
another plastic waste, or non-plastic waste. Note that some photos may not contain any waste.
|
13 |
"""
|
14 |
|
41 |
"image": datasets.Image(),
|
42 |
"litter": datasets.Sequence(
|
43 |
{
|
44 |
+
"label": datasets.ClassLabel(num_classes=4, names=["PLASTIC_BAG", "PLASTIC_BOTTLE", "OTHER_PLASTIC_WASTE", "NOT_PLASTIC_WASTE"]),
|
45 |
"bbox": datasets.Sequence(datasets.Value("float32"), length=4),
|
46 |
}
|
47 |
)
|
48 |
}
|
49 |
)
|
50 |
+
|
51 |
return datasets.DatasetInfo(
|
52 |
description=_DESCRIPTION,
|
53 |
features=features,
|
90 |
})
|
91 |
|
92 |
yield idx, data
|
|