JXingZhao / EGNet

EGNet:Edge Guidance Network for Salient Object Detection (ICCV 2019)
311 stars 62 forks source link

是不是减去了数据集的所有图片的三个通道的均值来为实现归一化做准备? #14

Open StormArcher opened 4 years ago

StormArcher commented 4 years ago

是不是减去了数据集的所有图片的三个通道的均值来为实现归一化做准备?

in_ -= np.array((104.00699, 116.66877, 122.67892)) 另外这个三通道均值是自己计算的吗?还是每个数据集都会提供,我记得minist手写字数据集的视频教程里面都会提到这个减去均值的过程。

StormArcher commented 4 years ago

def load_image_test(pah):

todo =>pah(image_root+image_list)// ='./ECSSD/Imgs/1.jpg

if not os.path.exists(pah):
    print('File Not Exists')
im = cv2.imread(pah)
in_ = np.array(im, dtype=np.float32)  #?
im_size = tuple(in_.shape[:2])
# in_ = cv2.resize(in_, (cr_size[1], cr_size[0]), interpolation=cv2.INTER_LINEAR)
# in_ = in_[:,:,::-1] # only if use PIL to load image
in_ -= np.array((104.00699, 116.66877, 122.67892))
in_ = in_.transpose((2, 0, 1))
return in_, im_size

dataset.py 182行

JXingZhao commented 4 years ago

这个值是我们follow其他人工作的。

发件人:Archerzjc notifications@github.com 发送日期:2019-09-28 21:29:14 收件人:JXingZhao/EGNet EGNet@noreply.github.com 抄送人:Subscribed subscribed@noreply.github.com 主题:[JXingZhao/EGNet] 是不是减去了数据集的所有图片的三个通道的均值来为实现归一化做准备? (#14) 是不是减去了数据集的所有图片的三个通道的均值来为实现归一化做准备? in_ -= np.array((104.00699, 116.66877, 122.67892)) 另外这个三通道均值是自己计算的吗?还是每个数据集都会提供,我记得minist手写字数据集的视频教程里面都会提到这个减去均值的过程。 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.