目录结构

数据集目录结构

image.png
image.png
其中每个数据集中都配有Image原图和Mask真值图

方法预测显著性图目录结构

image.png
image.pngimage.png
其中每个方法下,针对每个数据集都有自己的预测Pred图

配置Config目录下的Python文件

  1. # -*- coding: utf-8 -*-
  2. import os
  3. # 此处只能写绝对路径
  4. _RGBD_SOD_ROOT = r"K:\RGBD_datasets"
  5. LFSD = dict(
  6. root=os.path.join(_RGBD_SOD_ROOT, "LFSD"),
  7. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "LFSD", "Image"), suffix=".jpg"),
  8. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "LFSD", "Mask"), suffix=".png"),
  9. )
  10. NLPR = dict(
  11. root=os.path.join(_RGBD_SOD_ROOT, "NLPR"),
  12. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "NLPR", "Image"), suffix=".jpg"),
  13. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "NLPR", "Mask"), suffix=".png"),
  14. # index_file=os.path.join(_RGBD_SOD_ROOT, "nlpr_test_jw_name_list.lst"),
  15. # 测试的时候应该使用全部数据来和方法的预测结果计算交集,这样才会测到所有的预测结果,所以就不使用index_file了。
  16. )
  17. NJUD500 = dict(
  18. root=os.path.join(_RGBD_SOD_ROOT, "NJUD500"),
  19. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD500", "Image"), suffix=".jpg"),
  20. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD500", "Mask"), suffix=".png"),
  21. # index_file=os.path.join(_RGBD_SOD_ROOT, "njud_test_jw_name_list.lst"),
  22. # 同上
  23. )
  24. NJUD498 = dict(
  25. root=os.path.join(_RGBD_SOD_ROOT, "NJUD498"),
  26. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD498", "Image"), suffix=".jpg"),
  27. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD498", "Mask"), suffix=".png"),
  28. # index_file=os.path.join(_RGBD_SOD_ROOT, "njud_test_jw_name_list.lst"),
  29. # 同上
  30. )
  31. NJUD485 = dict(
  32. root=os.path.join(_RGBD_SOD_ROOT, "NJUD485"),
  33. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD485", "Image"), suffix=".jpg"),
  34. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD485", "Mask"), suffix=".png"),
  35. # index_file=os.path.join(_RGBD_SOD_ROOT, "njud_test_jw_name_list.lst"),
  36. # 同上
  37. )
  38. NJUD503 = dict(
  39. root=os.path.join(_RGBD_SOD_ROOT, "NJUD5003"),
  40. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD5003", "Image"), suffix=".jpg"),
  41. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "NJUD5003", "Mask"), suffix=".png"),
  42. # index_file=os.path.join(_RGBD_SOD_ROOT, "njud_test_jw_name_list.lst"),
  43. # 同上
  44. )
  45. RGBD135 = dict(
  46. root=os.path.join(_RGBD_SOD_ROOT, "RGBD135"),
  47. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "RGBD135", "Image"), suffix=".jpg"),
  48. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "RGBD135", "Mask"), suffix=".png"),
  49. )
  50. SIP = dict(
  51. root=os.path.join(_RGBD_SOD_ROOT, "SIP"),
  52. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "SIP", "Image"), suffix=".jpg"),
  53. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "SIP", "Mask"), suffix=".png"),
  54. )
  55. SSD = dict(
  56. root=os.path.join(_RGBD_SOD_ROOT, "SSD"),
  57. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "SSD", "Image"), suffix=".jpg"),
  58. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "SSD", "Mask"), suffix=".png"),
  59. )
  60. STEREO797 = dict(
  61. root=os.path.join(_RGBD_SOD_ROOT, "STEREO797"),
  62. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "STEREO797", "Image"), suffix=".jpg"),
  63. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "STEREO797", "Mask"), suffix=".png"),
  64. )
  65. DUTRGBD = dict(
  66. root=os.path.join(_RGBD_SOD_ROOT, "DUTRGBD"),
  67. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "DUTRGBD", "Image"), suffix=".jpg"),
  68. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "DUTRGBD", "Mask"), suffix=".png"),
  69. )
  70. STEREO1000 = dict(
  71. root=os.path.join(_RGBD_SOD_ROOT, "STEREO1000"),
  72. image=dict(path=os.path.join(_RGBD_SOD_ROOT, "STEREO1000", "Image"), suffix=".jpg"),
  73. mask=dict(path=os.path.join(_RGBD_SOD_ROOT, "STEREO1000", "Mask"), suffix=".png"),
  74. )

配置方法configmethod*.py配置文件

  1. # -*- coding: utf-8 -*-
  2. import os
  3. from utils.staticparams import *
  4. D3Net_ROOT = r"K:\other_model_maps\2019\D3Net"
  5. D3Net = {
  6. "LFSD": AUTO_PNG,
  7. "NJUD500": AUTO_PNG,
  8. "NLPR": AUTO_PNG,
  9. "RGBD135": AUTO_PNG,
  10. "SIP": AUTO_PNG,
  11. "SSD": AUTO_PNG,
  12. "STEREO797": None,
  13. "STEREO1000": AUTO_PNG,
  14. "DUTRGBD": None,
  15. }
  1. # -*- coding: utf-8 -*-
  2. import os
  3. from utils.staticparams import *
  4. DCF_ROOT = r"K:\other_model_maps\2019\DCF"
  5. DCF = {
  6. "LFSD": AUTO_PNG,
  7. "NJUD500": AUTO_PNG,
  8. "NLPR": AUTO_PNG,
  9. "RGBD135": AUTO_PNG,
  10. "SIP": AUTO_PNG,
  11. "SSD": AUTO_PNG,
  12. "STEREO797": None,
  13. "STEREO1000": AUTO_PNG,
  14. "DUTRGBD": None,
  15. }

使用tools/pyconfig_to_jsonconfig.py对配置文件进行转换,转换成json格式

直接点击运行即可,在运行前,先填写好相关路径