def test_print_result(self): device = FakeDevice(SourceType.IMAGE, 'dataset/png/') # device = FakeDevice(SourceType.IMAGE, '/media/zis/Dados/dev/datasets/putkk.poznan/Dataset_1_Kin_2') algorithms = [] algorithms.append( RGBDSegmentation( Parameter(Segmentation.GRAPH_CANNY, os.getcwd() + '/results/graph_canny/', resize=(640, 360), fix_proportion=False))) #algorithms.append(RGBDSegmentation(Parameter(Segmentation.RGBD_SALIENCY, os.getcwd() + '/results/rgbd_saliency/', resize=(324, 324)))) #algorithms.append(RGBDSegmentation(Parameter(Segmentation.FCN_TENSORFLOW, os.getcwd() + '/results/fcn_tensorflow/', resize=(224, 224)))) #algorithms.append(RGBDSegmentation(Parameter(Segmentation.FUSENET, os.getcwd() + '/results/fusenet/', resize=(224, 224)))) directory_rgb = device.datasetPath + 'rgb/' directory_depth = device.datasetPath + 'depth/' for algorithm in algorithms: Logger.info('############# Testing algorithm ' + str(algorithm.parameter.segmentation)) for i in range(0, 10): frame = RGBDFrame( RGBFrame(directory_rgb, 'rgb_' + format(i, '05') + '.png'), DepthFrame(directory_depth, 'depth_' + format(i, '05') + '.png')) algorithm.process(frame) algorithm.write_results() algorithm.finish() #break algorithm.release() break
def test_print_result(self): device = FakeDevice(SourceType.IMAGE, 'dataset/png/') parameter = Parameter(Segmentation.FUSENET, os.getcwd() + '/results/fusenet/', resize=(224, 224)) seg = RGBDSegmentation(parameter) directory_rgb = device.datasetPath + 'rgb/' directory_depth = device.datasetPath + 'depth/' frame = RGBDFrame(RGBFrame(directory_rgb, 'inp_5.png'), DepthFrame(directory_depth, 'gt_5.png')) seg.process(frame) #seg.print_results() seg.finish() frame = RGBDFrame(RGBFrame(directory_rgb, 'inp_6.png'), DepthFrame(directory_depth, 'gt_6.png')) seg.process(frame) #seg.print_results() seg.finish() frame = RGBDFrame(RGBFrame(directory_rgb, '8.png'), DepthFrame(directory_depth, '8.png')) seg.process(frame) #seg.print_results() seg.finish()
def test_write_result(self): device = FakeDevice(SourceType.IMAGE, 'dataset/png/') parameter = Parameter(Segmentation.RGBD_SALIENCY, os.getcwd()+'/results/rgbd_saliency/') seg = RGBDSegmentation(parameter) directory_rgb = device.datasetPath + 'rgb/' directory_depth = device.datasetPath + 'depth/' frame = RGBDFrame(RGBFrame(directory_rgb, 'demo1.png'), DepthFrame(directory_depth, 'demo1.png')) seg.process(frame) seg.write_results() seg.finish() frame = RGBDFrame(RGBFrame(directory_rgb, 'demo3.png'), DepthFrame(directory_depth, 'demo3.png')) seg.process(frame) seg.write_results() seg.finish()
def test_write_result(self): device = FakeDevice(SourceType.IMAGE, 'dataset/png/') parameter = Parameter(Segmentation.GRAPH_CANNY, os.getcwd() + '/results/graph_canny/', resize=(640, 360)) seg = RGBDSegmentation(parameter) directory_rgb = device.datasetPath + 'rgb/' directory_depth = device.datasetPath + 'depth/' for i in range(0, 10): frame = RGBDFrame( RGBFrame(directory_rgb, 'rgb_' + format(i, '05') + '.png'), DepthFrame(directory_depth, 'depth_' + format(i, '05') + '.png')) seg.process(frame) seg.write_results() seg.finish()