leowang707
commited on
Commit
•
3d0ce26
1
Parent(s):
65e8dd4
Upload 2 files
Browse files- Boat_dataset.py +3 -3
- classes.txt +9 -0
Boat_dataset.py
CHANGED
@@ -23,7 +23,7 @@ _HOMEPAGE = "https://huggingface.co/datasets/leowang707/Boat_dataset/resolve/mai
|
|
23 |
_LICENSE = ""
|
24 |
|
25 |
_URLS = {
|
26 |
-
|
27 |
"train": f"{_HOMEPAGE}/data/instances_train2023r.jsonl",
|
28 |
"val": f"{_HOMEPAGE}/data/instances_val2023r.jsonl",
|
29 |
}
|
@@ -63,8 +63,8 @@ class BoatDataset(datasets.GeneratorBasedBuilder):
|
|
63 |
downloaded_files = dl_manager.download_and_extract(_URLS)
|
64 |
|
65 |
# Load class labels from the classes file
|
66 |
-
|
67 |
-
|
68 |
|
69 |
return [
|
70 |
datasets.SplitGenerator(
|
|
|
23 |
_LICENSE = ""
|
24 |
|
25 |
_URLS = {
|
26 |
+
"classes": f"{_HOMEPAGE}/data/classes.txt",
|
27 |
"train": f"{_HOMEPAGE}/data/instances_train2023r.jsonl",
|
28 |
"val": f"{_HOMEPAGE}/data/instances_val2023r.jsonl",
|
29 |
}
|
|
|
63 |
downloaded_files = dl_manager.download_and_extract(_URLS)
|
64 |
|
65 |
# Load class labels from the classes file
|
66 |
+
with open('classes.txt', 'r') as file:
|
67 |
+
classes = [line.strip() for line in file.readlines()]
|
68 |
|
69 |
return [
|
70 |
datasets.SplitGenerator(
|
classes.txt
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
BallonBoat
|
2 |
+
BigBoat
|
3 |
+
Boat
|
4 |
+
JetSki
|
5 |
+
Katamaran
|
6 |
+
SailBoat
|
7 |
+
SmallBoat
|
8 |
+
SpeedBoat
|
9 |
+
WAM_V
|