backseason / PoolNet

Code for our CVPR 2019 paper "A Simple Pooling-Based Design for Real-Time Salient Object Detection"
MIT License
629 stars 153 forks source link

the joint pre-train model is not working #46

Closed BarCodeReader closed 4 years ago

BarCodeReader commented 4 years ago

I just feel curious about the joint training result and loaded the joint-poolnet model you provided.

I tested on the HUK-IS dataset and the output is not the same as yours, the edges are not correctly predicted.

Seems like the pre-train model is not working.

may get your advices on this?

backseason commented 4 years ago

The predicted saliency and edge maps are directly produced the corresponding pretrained model in the zip file.

Please make sure you have followed the instructions in the README.md file strictly.

From the information provided by you, I have no further suggestions.

BarCodeReader commented 4 years ago

finally solved, its my bad...thanks anyway. Here I have another question about your data loading process:

in your dataset.py file

def load_image_test(path):
    if not os.path.exists(path):
        print('File {} not exists'.format(path))
    im = cv2.imread(path)
    in_ = np.array(im, dtype=np.float32)
    im_size = tuple(in_.shape[:2])
    in_ -= np.array((104.00699, 116.66877, 122.67892))
    in_ = in_.transpose((2,0,1))
    return in_, im_size

may i know how to get those numbers np.array((104.00699, 116.66877, 122.67892))? or say, why do you substract this value?

backseason commented 4 years ago

It's the mean value calculated over channels across the whole ImageNet dataset. Subtracting the dataset mean aims to "center" the data. We used this value directly and didn't recalculate the value for the DUTS dataset as the BN layers were trained on the ImageNet and frozen for all our experiments.

BarCodeReader commented 4 years ago

Thanks for your explaination and your work for this model!