// classfier data to a temporary file and give it to vigra.
tmpDir = tempfile.mkdtemp()
cachePath = os.path.join(tmpDir, "tmp_classifier_cache.h5").replace("\\", "/")
with h5py.File(cachePath, "w") as cacheFile:
cacheFile.copy(classifierGroup, self.name)
forests = []
After Change
def _deserialize(self, classifierGroup, slot):
try:
classifier_type = pickle.loads( classifierGroup["pickled_type"][()] )
except KeyError:
// For compatibility with old project files, choose the default classifier.
from lazyflow.classifiers import ParallelVigraRfLazyflowClassifier