from datasets import sbd
from env import SBD_PROC_DATA_DIR
import cv2
from pathlib import Path
dataset = sbd.SBDEdgeDetection(str(SBD_PROC_DATA_DIR), 'val', 'vis')
img, target, img_name, img_size = dataset[0]
print('target_shape:', target.shape)
print('img_name: ', img_name)
print('img_size: ', img_size)
person, train = target[14], target[18]
Path('cv2').mkdir()
cv2.imwrite('cv2/person.png', (person * 255).numpy().astype('uint8'))
cv2.imwrite('cv2/train.png', (train * 255).numpy().astype('uint8'))
and then make a directory 'fuse_cv2' which meets the structure of the file directory that needs to be evaluated. this is the structure of fuse_cv2:
fuse_cv2.zip
there are two question in this file:
I find demoBatchEval.m just run the first .png file to evaluate meanMF, so how can I run all .png file to evaluate the meanMF of the hole dataset.
I use the code below to convert the target to .png file
and then make a directory 'fuse_cv2' which meets the structure of the file directory that needs to be evaluated. this is the structure of fuse_cv2:
fuse_cv2.zip
but the all MF in the evaluation results of demoBatchEval.m are 0:
