目录结构
数据集目录结构
方法预测显著性图目录结构
配置Config目录下的Python文件
# -*- coding: utf-8 -*-
import os
# 此处只能写绝对路径
_RGBD_SOD_ROOT = r"K:\RGBD_datasets"
LFSD = dict(
root=os.path.join(_RGBD_SOD_ROOT, "LFSD"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "LFSD", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "LFSD", "Mask"), suffix=".png"),
)
NLPR = dict(
root=os.path.join(_RGBD_SOD_ROOT, "NLPR"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "NLPR", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "NLPR", "Mask"), suffix=".png"),
# index_file=os.path.join(_RGBD_SOD_ROOT, "nlpr_test_jw_name_list.lst"),
# 测试的时候应该使用全部数据来和方法的预测结果计算交集,这样才会测到所有的预测结果,所以就不使用index_file了。
)
NJUD500 = dict(
root=os.path.join(_RGBD_SOD_ROOT, "NJUD500"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD500", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD500", "Mask"), suffix=".png"),
# index_file=os.path.join(_RGBD_SOD_ROOT, "njud_test_jw_name_list.lst"),
# 同上
)
NJUD498 = dict(
root=os.path.join(_RGBD_SOD_ROOT, "NJUD498"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD498", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD498", "Mask"), suffix=".png"),
# index_file=os.path.join(_RGBD_SOD_ROOT, "njud_test_jw_name_list.lst"),
# 同上
)
NJUD485 = dict(
root=os.path.join(_RGBD_SOD_ROOT, "NJUD485"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD485", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD485", "Mask"), suffix=".png"),
# index_file=os.path.join(_RGBD_SOD_ROOT, "njud_test_jw_name_list.lst"),
# 同上
)
NJUD503 = dict(
root=os.path.join(_RGBD_SOD_ROOT, "NJUD5003"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD5003", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD5003", "Mask"), suffix=".png"),
# index_file=os.path.join(_RGBD_SOD_ROOT, "njud_test_jw_name_list.lst"),
# 同上
)
RGBD135 = dict(
root=os.path.join(_RGBD_SOD_ROOT, "RGBD135"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "RGBD135", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "RGBD135", "Mask"), suffix=".png"),
)
SIP = dict(
root=os.path.join(_RGBD_SOD_ROOT, "SIP"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "SIP", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "SIP", "Mask"), suffix=".png"),
)
SSD = dict(
root=os.path.join(_RGBD_SOD_ROOT, "SSD"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "SSD", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "SSD", "Mask"), suffix=".png"),
)
STEREO797 = dict(
root=os.path.join(_RGBD_SOD_ROOT, "STEREO797"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "STEREO797", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "STEREO797", "Mask"), suffix=".png"),
)
DUTRGBD = dict(
root=os.path.join(_RGBD_SOD_ROOT, "DUTRGBD"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "DUTRGBD", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "DUTRGBD", "Mask"), suffix=".png"),
)
STEREO1000 = dict(
root=os.path.join(_RGBD_SOD_ROOT, "STEREO1000"),
image=dict(path=os.path.join(_RGBD_SOD_ROOT, "STEREO1000", "Image"), suffix=".jpg"),
mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "STEREO1000", "Mask"), suffix=".png"),
)
配置方法configmethod*.py配置文件
# -*- coding: utf-8 -*-
import os
from utils.staticparams import *
D3Net_ROOT = r"K:\other_model_maps\2019\D3Net"
D3Net = {
"LFSD": AUTO_PNG,
"NJUD500": AUTO_PNG,
"NLPR": AUTO_PNG,
"RGBD135": AUTO_PNG,
"SIP": AUTO_PNG,
"SSD": AUTO_PNG,
"STEREO797": None,
"STEREO1000": AUTO_PNG,
"DUTRGBD": None,
}
# -*- coding: utf-8 -*-
import os
from utils.staticparams import *
DCF_ROOT = r"K:\other_model_maps\2019\DCF"
DCF = {
"LFSD": AUTO_PNG,
"NJUD500": AUTO_PNG,
"NLPR": AUTO_PNG,
"RGBD135": AUTO_PNG,
"SIP": AUTO_PNG,
"SSD": AUTO_PNG,
"STEREO797": None,
"STEREO1000": AUTO_PNG,
"DUTRGBD": None,
}
使用tools/pyconfig_to_jsonconfig.py对配置文件进行转换,转换成json格式
直接点击运行即可,在运行前,先填写好相关路径