-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zjut-LDFnet #123
zjut-LDFnet #123
Conversation
cd model | ||
python3 train.py | ||
python3 test.py | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里指示有点迷惑,我看还提供了train.sh 脚本,这里没提到。还有上面预训练模型怎么用,没有提供脚本
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resnet预训练模型用于train,放入/pretrained文件夹。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LDFmodel放入\out文件夹,用于test.py
建议再仔细对照 模型验收&pr提交标准 |
|
||
-[DUTS-TR](http://saliencydetection.net/duts/download/DUTS-TR.zip) / | ||
-[DUTS-TE](http://saliencydetection.net/duts/download/DUTS-TE.zip) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
数据集的下载直接加到 train.sh 脚本中
|
||
def initialize(self): | ||
self.load_param('pretrained/resnet50-19c8e357') | ||
# self.load_state_dict(flow.load('pretrained/resnet50_pretrained_model'), strict=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删除
m.bias.data.zero_() | ||
|
||
def initialize(self): | ||
self.load_param('pretrained/resnet50-19c8e357') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
模型路劲作为参数传入
outb1, outd1, out1, outb2, outd2, out2 = self.net(image, shape) | ||
out = out2 | ||
pred = flow.sigmoid(out[0, 0]).to('cpu').numpy() * 255 | ||
head = '../eval/maps/' + self.cfg.datapath.split('/')[-1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
路径作为参数,从脚本传入
submitted by guyubin from zjut