Spaces:
Runtime error
Runtime error
xinwei89
commited on
Commit
•
008d1df
1
Parent(s):
7f9e63f
test datasets
Browse files- .gitignore +1 -0
- backend.py +7 -5
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
urban*
|
backend.py
CHANGED
@@ -80,8 +80,8 @@ def visualize_image(im, mode, tree_threshold:float, building_threshold:float, co
|
|
80 |
tree_instances = segment_tree(im, tree_threshold)
|
81 |
building_instances = segment_building(im, building_threshold)
|
82 |
instances = Instances.cat([tree_instances, building_instances])
|
83 |
-
|
84 |
-
metadata = MetadataCatalog.get("
|
85 |
print("metadata", type(metadata), metadata)
|
86 |
print('metadata.get("thing_classes")', type(metadata.get("thing_classes")), metadata.get("thing_classes"))
|
87 |
|
@@ -90,10 +90,12 @@ def visualize_image(im, mode, tree_threshold:float, building_threshold:float, co
|
|
90 |
scale=0.5,
|
91 |
instance_mode=color_mode)
|
92 |
|
93 |
-
|
94 |
-
|
95 |
|
96 |
-
|
|
|
|
|
97 |
# visualizer = Visualizer(im[:, :, ::-1],
|
98 |
# metadata=metadata,
|
99 |
# scale=0.5,
|
|
|
80 |
tree_instances = segment_tree(im, tree_threshold)
|
81 |
building_instances = segment_building(im, building_threshold)
|
82 |
instances = Instances.cat([tree_instances, building_instances])
|
83 |
+
|
84 |
+
metadata = MetadataCatalog.get("urban-trees-fdokv_train")
|
85 |
print("metadata", type(metadata), metadata)
|
86 |
print('metadata.get("thing_classes")', type(metadata.get("thing_classes")), metadata.get("thing_classes"))
|
87 |
|
|
|
90 |
scale=0.5,
|
91 |
instance_mode=color_mode)
|
92 |
|
93 |
+
dataset_names = MetadataCatalog.list()
|
94 |
+
print(dataset_names)
|
95 |
|
96 |
+
metadata = MetadataCatalog.get("urban-small_train")
|
97 |
+
category_names = metadata.get("thing_classes")
|
98 |
+
print(category_names)
|
99 |
# visualizer = Visualizer(im[:, :, ::-1],
|
100 |
# metadata=metadata,
|
101 |
# scale=0.5,
|