Commit 1582b5f7 authored by Diego André Sant'Ana's avatar Diego André Sant'Ana 🤞
parents 9f4009b4 2b30dbf4
......@@ -23,6 +23,12 @@ except Exception as e:
CNNKeras = None
print(e)
try:
from .cnn_pseudo_label_keras import CNNPseudoLabel
except Exception as e:
CNNPseudoLabel = None
print e.message
try:
from .segnet_keras import SEGNETKeras
......@@ -34,6 +40,7 @@ except Exception as e:
__all__ = ["classifier",
"cnn_caffe",
"cnn_keras",
"cnn_pseudo_label_keras",
"segnet_keras",
"weka_classifiers",
"syntactic"
......@@ -49,6 +56,8 @@ _classifier_list = OrderedDict( [
WekaClassifiers is None and CNNCaffe is not None, bool, meta=CNNCaffe, hidden=CNNCaffe is None)],
["cnn_keras", Config("Invalid" if CNNKeras is None else CNNKeras.__name__,
CNNKeras is not None, bool, meta=CNNKeras, hidden=CNNKeras is None)],
["cnn_pseudo_label_keras", Config("Invalid" if CNNPseudoLabel is None else CNNPseudoLabel.__name__,
CNNPseudoLabel is not None, bool, meta=CNNPseudoLabel, hidden=CNNPseudoLabel is None)],
["segnet_keras", Config("Invalid" if SEGNETKeras is None else SEGNETKeras.__name__,
SEGNETKeras is not None, bool, meta=SEGNETKeras, hidden=SEGNETKeras is None)],
["weka_classifiers", Config("Invalid" if WekaClassifiers is None else WekaClassifiers.__name__,
......@@ -63,6 +72,7 @@ def get_classifier_config():
def set_classifier_config(configs):
_classifier_list["cnn_caffe"] = Config.nvl_config(configs["cnn_caffe"], _classifier_list["cnn_caffe"])
_classifier_list["cnn_keras"] = Config.nvl_config(configs["cnn_keras"], _classifier_list["cnn_keras"])
_classifier_list["cnn_pseudo_label_keras"] = Config.nvl_config(configs["cnn_pseudo_label_keras"], _classifier_list["cnn_pseudo_label_keras"])
_classifier_list["segnet_keras"] = Config.nvl_config(configs["segnet_keras"], _classifier_list["segnet_keras"])
_classifier_list["weka_classifiers"] = Config.nvl_config(configs["weka_classifiers"], _classifier_list["weka_classifiers"])
_classifier_list["syntactic"] = Config.nvl_config(configs["syntactic"], _classifier_list["syntactic"])
This diff is collapsed.
This diff is collapsed.
......@@ -594,7 +594,7 @@ class Act(object):
height, width, channels = self._image.shape
self.class_color = np.zeros((height,width,3), np.uint8)
for (c, cl) in enumerate(self.classes):
idx_segment = [ list_segments[idx] for idx in range(0, len(labels)) if cl["name"].value == labels[idx]]
idx_segment = [ list_segments[idx] for idx in range(0, len(labels)) if cl["name"].value == labels[idx] or c == labels[idx]]
if len(idx_segment) > 0:
self._image, _ = self.segmenter.paint_segment(self._image, cl["color"].value, idx_segment=idx_segment, border=False)
for idx in idx_segment:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment