Open CharlesShang opened 7 years ago
Dear @pudae, thanks for the implementation, really easy to use. Will you upload the pspnet_v1_50.ckpt model??
Very helpful codes. @pudae , Could you also provide it to me?
Very helpful codes. @pudae , Could you also provide it to me?
Guys I'm new in this things. Can anyone please explain what I need to do in order to load an image and see the results of semantic classification ? I have Tensorflow working. At least the "hello world" is displaying (the version with GPU support). Thanks in advance
Dear @pudae, thanks for the implementation. Could you explain how to use your codes ? Will you upload the trained model??
Guys , have you got the pspnet_v1_50.ckpt model? I need it also, Thks a lot.
Sorry for too late answer. I have the pspnet_v1_50.ckpt model. But... because this code is not compete reimplementation of original PSPNet,
it's very poor result, only about 33 mIOU on ADE20k validation set. If you guys need such a poor result, I'll upload it.
Hi @pudae, thanks a lot for this well-written code.
Regarding the _pspnet_v150.ckpt model, I don't know if this refers to (1) the pre-trained model on ImageNet or (2) the one fine-tuned on ADE20K.
Anyway, I think model (1) would be useful. Even 33% mIoU is better than FCN, SegNet or DilatedNet.
It would be also very useful if you could upload model (2) pre-trained on ImageNet because the root_block
is different from the original ResNet50 and I believe that your layers naming convention is also different. Model (2) would make fine-tuning on other dataset possible with Tensorflow.
Sorry to late upload the checkpoint file. I have had one, but I lost it, so I retrained. This is the new checkpoint file.
This result is a little better, about 0.349 mIOU.
Thanks @pudae !
@pudae hi. how to make checkpoint file to ckpt file?
@Heidisnaps You don't really need .ckpt file. One can just restore variables using the checkpoint.
checkpoint
in /path/to/checkpoint/
directory and add the following lines inside:
model_checkpoint_path: "/path/to/checkpoint/model.ckpt-150000"
all_model_checkpoint_paths: "/path/to/checkpoint/model.ckpt-150000"
# Define your graph
# ...
# Load variables from the provided checkpoint
restore_var = ... # list of variables you want to restore
loader = tf.train.Saver(var_list=restore_var)
loader = tf.train.import_meta_graph('/path/to/checkpoint/model.ckpt-150000.meta')
loader.restore(sess, tf.train.latest_checkpoint(/path/to/checkpoint/))
@howard-mahe thanks for answer. what's mean:
Restore variables in your evaluation code: Define your graph ... Load variables from the provided checkpoint restore_var = ... # list of variables you want to restore loader = tf.train.Saver(var_list=restore_var) loader = tf.train.import_meta_graph('/path/to/checkpoint/model.ckpt-150000.meta') loader.restore(sess, tf.train.latest_checkpoint(/path/to/checkpoint/))
Do you mean to create a new xxx.py? Or do you mean to modify the existing py file (test_model.py or something)?
I gave a quick look at test_model.py, I think you should better use test_segmentation.
There are already in this script some useful lines to restore a checkpoint, like:
variables_to_restore = slim.get_variables_to_restore()
...
saver = tf.train.Saver(variables_to_restore)
...
saver.restore(sess, checkpoint_path)
If this script doesn't run in your first attempt, just adapt a little bit how to restore the checkpoint (using code I provided in my last answer)
Just found this awesome project. Would you mind releasing the pspnet_v1_50.ckpt file?