google-research/deeplab2

Visual result output for KMaX-DeepLab model

Kathy-Bai opened this issue · 2 comments

For the KMaX-DeepLab model, are there detailed steps to evaluate and test model after training the model? How to output visual results using COCO data sets? I hope someone can help me with that. Thank you for your kindness.

Hi,
Use this command for evaluation:

python trainer/train.py
--config_file={textproto_file_path}
--mode="eval"
--model_dir={dir_name}
--num_gpus=1

Coming to the output visualization,
When you run the above script, it will create a folder 'vis' inside the {dir_name/experiment_name}, and in that it will save visualizations of some of the samples. If you want to see the visualization for all samples, you can edit:

deeplab2/trainer/evaluator.py,
if (self._enable_visualization and
(self._sample_counter < self._num_vis_samples)):

Remove the condition of "self._sample_counter < self._num_vis_samples" to visualizations of all the images.