Skip to content

Commit

Permalink
Fix prediction category (#86)
Browse files Browse the repository at this point in the history
* use color category for prediction layer

* black
  • Loading branch information
philippotto authored May 15, 2019
1 parent ecabbac commit 59265df
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions wkcuber/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ def detect_resolutions(dataset_path, layer) -> List[Mag]:
logging.info("ignoring {} as resolution".format(mag))


def detect_standard_layer(dataset_path, layer_name, exact_bounding_box=None):
def detect_standard_layer(
dataset_path, layer_name, exact_bounding_box=None, category="color"
):
# Perform metadata detection for well-known layers

mags = list(detect_resolutions(dataset_path, layer_name))
Expand All @@ -233,7 +235,7 @@ def detect_standard_layer(dataset_path, layer_name, exact_bounding_box=None):
return {
"dataFormat": "wkw",
"name": layer_name,
"category": layer_name,
"category": category,
"elementClass": dtype,
"boundingBox": bbox,
"wkwResolutions": list(resolutions),
Expand All @@ -243,7 +245,9 @@ def detect_standard_layer(dataset_path, layer_name, exact_bounding_box=None):
def detect_segmentation_layer(
dataset_path, layer_name, max_id, compute_max_id=False, exact_bounding_box=None
):
layer_info = detect_standard_layer(dataset_path, layer_name, exact_bounding_box)
layer_info = detect_standard_layer(
dataset_path, layer_name, exact_bounding_box, category="segmentation"
)
layer_info["mappings"] = []
layer_info["largestSegmentId"] = max_id

Expand Down

0 comments on commit 59265df

Please sign in to comment.