ISCAS007 / torchseg

use pytorch to do image semantic segmentation
GNU General Public License v3.0
7 stars 1 forks source link

2018-09-02 deeplab + edge summary #16

Open yzbx opened 6 years ago

yzbx commented 6 years ago

todo

ignore label for edge (orange line for psp_edge, green line for pspnet)

image

yzbx commented 6 years ago

ignore label for edge (orange line for psp_edge, green line for pspnet)

image

yzbx commented 6 years ago

graph summary

graph viz

image

code demo with feed_dict

summary ops

How TensorBoard loads the data

Why does it read the whole directory, rather than an individual file? You might have been using supervisor.py to run your model, in which case if TensorFlow crashes, the supervisor will restart it from a checkpoint. When it restarts, it will start writing to a new events file, and TensorBoard will stitch the various event files together to produce a consistent history of what happened.

Tensorboard Text: Markdown Support

The Text Dashboard displays text snippets saved via tf.summary.text. Markdown features including hyperlinks, lists, and tables are all supported.

yzbx commented 6 years ago

slim and tensorboard

yzbx commented 6 years ago

slim reference

slim

data flow

  1. dataset_factory->[height,width,channel]
  2. slim.dataset_data_provider.DatasetDataProvider->[height,width,channel]
  3. preprocessing_factory->[height,width,channel]
  4. tf.train.batch->[batch,height,width,channel]
  5. nets_factory->[batch,height,width,channel]

slim metrics

Print the summaries to screen.

for name, value in names_to_values.items(): summary_name = 'eval/%s' % name op = tf.summary.scalar(summary_name, value, collections=[]) op = tf.Print(op, [value], summary_name) tf.add_to_collection(tf.GraphKeys.SUMMARIES, op)


# slim init weight from checkpoint path

variables_to_restore = [] for var in slim.get_model_variables(): for exclusion in exclusions: if var.op.name.startswith(exclusion): break else: variables_to_restore.append(var)

init_fn=slim.assign_from_checkpoint_fn( checkpoint_path, variables_to_restore, ignore_missing_vars=FLAGS.ignore_missing_vars)