欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

EGNet代码测试

程序员文章站 2024-03-07 23:31:09
...

EGNet代码测试

作者源代码
根据作者GitHub的步骤,依次往下进行。
需要更改的地方:

1EGNet代码测试

2

class ImageDataTest(data.Dataset):
    def __init__(self, test_mode=1, sal_mode='e'):
        if test_mode == 0:
            # self.image_root = '/home/liuj/dataset/saliency_test/ECSSD/Imgs/'
            # self.image_source = '/home/liuj/dataset/saliency_test/ECSSD/test.lst'
            self.image_root = '/home/liuj/dataset/HED-BSDS_PASCAL/HED-BSDS/test/'
            self.image_source = '/home/liuj/dataset/HED-BSDS_PASCAL/HED-BSDS/test.lst'
            
            
        elif test_mode == 1:
            if sal_mode == 'e':
                self.image_root = '/home/liuj/dataset/saliency_test/ECSSD/Imgs/'
                self.image_source = '/home/liuj/dataset/saliency_test/ECSSD/test.lst'
                self.test_fold = '/media/ubuntu/disk/Result/saliency/ECSSD/'
            elif sal_mode == 'p':
                self.image_root = '/home/liuj/dataset/saliency_test/PASCALS/Imgs/'
                self.image_source = '/home/liuj/dataset/saliency_test/PASCALS/test.lst'
                self.test_fold = '/media/ubuntu/disk/Result/saliency/PASCALS/'
            elif sal_mode == 's':
                self.image_root = '/home/liuj/dataset/saliency_test/SOD/Imgs/'
                self.image_source = '/home/liuj/dataset/saliency_test/SOD/test.lst'
                self.test_fold = '/media/ubuntu/disk/Result/saliency/SOD/'
        elif test_mode == 2:
 
            self.image_root = '/home/liuj/dataset/SK-LARGE/images/test/'
            self.image_source = '/home/liuj/dataset/SK-LARGE/test.lst'
 
        with open(self.image_source, 'r') as f:
            self.image_list = [x.strip() for x in f.readlines()]

EGNet代码测试
参考文献:参考文献

相关标签: 显著性检测