featMatrix=numpy.concatenate(featMatrix,axis=0)
labelsMatrix=numpy.concatenate(labelsMatrix,axis=0)
RF=vigra.learning.RandomForest(100)
try:
logger.debug("Learning with Vigra...")
RF.learnRF(featMatrix.astype(numpy.float32),labelsMatrix.astype(numpy.uint32))
logger.debug("Vigra finished")
except:
logger.error( "ERROR: could not learn classifier" )
logger.error( "featMatrix shape={}, max={}, dtype={}".format(featMatrix.shape, featMatrix.max(), featMatrix.dtype) )
logger.error( "labelsMatrix shape={}, max={}, dtype={}".format(labelsMatrix.shape, labelsMatrix.max(), labelsMatrix.dtype ) )
raise
finally:
self.progressSignal(100)
assert RF is not None, "RF = %r" % RF
result[0]=RF
return result
def setInSlot(self, slot, key, value):
After Change
requests.append(req)
for r in requests:
r.wait()
logger.debug("Vigra finished")
except:
logger.error( "ERROR: could not learn classifier" )
logger.error( "featMatrix shape={}, max={}, dtype={}".format(featMatrix.shape, featMatrix.max(), featMatrix.dtype) )