{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/models/issues/3730","repository_url":"https://api.github.com/repos/tensorflow/models","labels_url":"https://api.github.com/repos/tensorflow/models/issues/3730/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/models/issues/3730/comments","events_url":"https://api.github.com/repos/tensorflow/models/issues/3730/events","html_url":"https://github.com/tensorflow/models/issues/3730","id":308260035,"node_id":"MDU6SXNzdWUzMDgyNjAwMzU=","number":3730,"title":"[deeplab] Training deeplab model with ADE20K dataset","user":{"login":"walkerlala","id":11005974,"node_id":"MDQ6VXNlcjExMDA1OTc0","avatar_url":"https://avatars0.githubusercontent.com/u/11005974?v=4","gravatar_id":"","url":"https://api.github.com/users/walkerlala","html_url":"https://github.com/walkerlala","followers_url":"https://api.github.com/users/walkerlala/followers","following_url":"https://api.github.com/users/walkerlala/following{/other_user}","gists_url":"https://api.github.com/users/walkerlala/gists{/gist_id}","starred_url":"https://api.github.com/users/walkerlala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walkerlala/subscriptions","organizations_url":"https://api.github.com/users/walkerlala/orgs","repos_url":"https://api.github.com/users/walkerlala/repos","events_url":"https://api.github.com/users/walkerlala/events{/privacy}","received_events_url":"https://api.github.com/users/walkerlala/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":55,"created_at":"2018-03-24T12:51:41Z","updated_at":"2018-06-11T13:31:53Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### System information\r\n- **What is the top-level directory of the model you are using**: deeplab\r\n- **Have I written custom code (as opposed to using a stock example script provided in TensorFlow)**: Yes\r\n- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Linux Ubuntu 16.04\r\n- **TensorFlow installed from (source or binary)**: binary\r\n- **TensorFlow version (use command below)**:  1.6.0\r\n- **Bazel version (if compiling from source)**:\r\n- **CUDA/cuDNN version**: 9.0/7.0.4\r\n- **GPU model and memory**: 1080Ti * 2 , 10Gb * 2\r\n- **Exact command to reproduce**: \r\n\r\n### Describe the problem\r\nThis is a feature request. I am trying to train the deeplab model with the [ADE20K dataset](http://groups.csail.mit.edu/vision/datasets/ADE20K/) (see [this presentation](http://presentations.cocodataset.org/Places17-GMRI.pdf)). I have finished the data format conversion and \"successfully\" train the model on a small subset of ADE20K. Below is the  modification to file `research/deeplab/datasets/segmentation_dataset.py` which is used to extract segmentation data.\r\n\r\n```\r\ndiff --git a/research/deeplab/datasets/segmentation_dataset.py b/research/deeplab/datasets/segmentation_dataset.py\r\nindex a777252..8648fb2 100644\r\n--- a/research/deeplab/datasets/segmentation_dataset.py\r\n+++ b/research/deeplab/datasets/segmentation_dataset.py\r\n@@ -85,10 +85,22 @@ _PASCAL_VOC_SEG_INFORMATION = DatasetDescriptor(\r\n     ignore_label=255,\r\n )\r\n \r\n+_ADE20K_INFORMATION = DatasetDescriptor(\r\n+    splits_to_sizes = {\r\n+        'train': 40,\r\n+        'val': 5,\r\n+    },\r\n+    # TODO temporarily change it to 21 otherwise dimension mismatch\r\n+    num_classes=21,\r\n+    ignore_label=255,\r\n+)\r\n+\r\n \r\n _DATASETS_INFORMATION = {\r\n     'cityscapes': _CITYSCAPES_INFORMATION,\r\n     'pascal_voc_seg': _PASCAL_VOC_SEG_INFORMATION,\r\n+    'ade20k': _ADE20K_INFORMATION,\r\n }\r\n \r\n # Default file pattern of TFRecord of TensorFlow Example.\r\n```\r\n\r\nThe problem is, in the ADE20K dataset there are 150 classes, which is different from that in the VOC or cityspace dataset. That brings problem w.r.t the checkpoint file. Currently there are only pretrained model on the VOC and cityspace dataset. So we have two choices here:\r\n\r\n  1. Do not use the checkpoint file. In this case, there is an error:\r\n```\r\nabsl.flags._exceptions.IllegalFlagValueError: flag --tf_initial_checkpoint=None: Flag --tf_initial_checkpoint must be specified.\r\n```\r\n\r\n  2. set num_classes=21 to use those two provided checkpoint files\r\n\r\nAre there any alternatives to these?\r\n\r\nIf anyone have any workable solution for the ADE20K dataset it would be really appreciated."},"comment":{"url":"https://api.github.com/repos/tensorflow/models/issues/comments/396244016","html_url":"https://github.com/tensorflow/models/issues/3730#issuecomment-396244016","issue_url":"https://api.github.com/repos/tensorflow/models/issues/3730","id":396244016,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjI0NDAxNg==","user":{"login":"hhwxxx","id":22972779,"node_id":"MDQ6VXNlcjIyOTcyNzc5","avatar_url":"https://avatars3.githubusercontent.com/u/22972779?v=4","gravatar_id":"","url":"https://api.github.com/users/hhwxxx","html_url":"https://github.com/hhwxxx","followers_url":"https://api.github.com/users/hhwxxx/followers","following_url":"https://api.github.com/users/hhwxxx/following{/other_user}","gists_url":"https://api.github.com/users/hhwxxx/gists{/gist_id}","starred_url":"https://api.github.com/users/hhwxxx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hhwxxx/subscriptions","organizations_url":"https://api.github.com/users/hhwxxx/orgs","repos_url":"https://api.github.com/users/hhwxxx/repos","events_url":"https://api.github.com/users/hhwxxx/events{/privacy}","received_events_url":"https://api.github.com/users/hhwxxx/received_events","type":"User","site_admin":false},"created_at":"2018-06-11T13:31:53Z","updated_at":"2018-06-11T13:31:53Z","author_association":"NONE","body":"@wenouyang  hello.\r\n`logits` is the last feature maps before softmax.\r\n\r\nMaybe [this](https://stackoverflow.com/a/43577384) can help you.\r\n\r\n> The vector of raw (non-normalized) predictions that a classification model generates, which is ordinarily then passed to a normalization function. If the model is solving a multi-class classification problem, logits typically become an input to the softmax function. The softmax function then generates a vector of (normalized) probabilities with one value for each possible class."}}
{"actor":{"display_login":"hhwxxx"}}