{"action":"created","issue":{"url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/1081","repository_url":"https://api.github.com/repos/matterport/Mask_RCNN","labels_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/1081/labels{/name}","comments_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/1081/comments","events_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/1081/events","html_url":"https://github.com/matterport/Mask_RCNN/issues/1081","id":374598106,"node_id":"MDU6SXNzdWUzNzQ1OTgxMDY=","number":1081,"title":"Mask_RCNN Backbone from Resnet 101 to Resnet152 problem","user":{"login":"enoceanwei","id":31890692,"node_id":"MDQ6VXNlcjMxODkwNjky","avatar_url":"https://avatars1.githubusercontent.com/u/31890692?v=4","gravatar_id":"","url":"https://api.github.com/users/enoceanwei","html_url":"https://github.com/enoceanwei","followers_url":"https://api.github.com/users/enoceanwei/followers","following_url":"https://api.github.com/users/enoceanwei/following{/other_user}","gists_url":"https://api.github.com/users/enoceanwei/gists{/gist_id}","starred_url":"https://api.github.com/users/enoceanwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enoceanwei/subscriptions","organizations_url":"https://api.github.com/users/enoceanwei/orgs","repos_url":"https://api.github.com/users/enoceanwei/repos","events_url":"https://api.github.com/users/enoceanwei/events{/privacy}","received_events_url":"https://api.github.com/users/enoceanwei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-27T02:42:40Z","updated_at":"2018-11-02T07:09:35Z","closed_at":null,"author_association":"NONE","body":"Dear All,\r\n   I am suffering problem, I try to modify the CNN backbone from default resnet101 to 152 architecture. However, follow the instruction of the resnet paper,  compared to resnet101, I can not get the good or expected result.\r\n\r\nin <mrcnn/config.py> file, I changed the backbone name\r\n$ BACKBONE = \"resnet152\"\r\n\r\nin <mrcnn/model.py> file, I add the reset152 graph function.\r\ndef resnet152_graph(input_image, architecture, stage5=False, train_bn=True):\r\n\r\nin <mrcnn/model.py> file, I revised these follow part:\r\n        if callable(config.BACKBONE):\r\n            _, C2, C3, C4, C5 = config.BACKBONE(input_image, stage5=True,\r\n                                                train_bn=config.TRAIN_BN)\r\n        else:\r\n            # wei changed here, 2018/09/28, for adding a resnet152 network\r\n            # _, C2, C3, C4, C5 = resnet_graph(input_image, config.BACKBONE,\r\n            #                                  stage5=True, train_bn=config.TRAIN_BN)\r\n            _, C2, C3, C4, C5 = resnet152_graph(input_image, config.BACKBONE,\r\n                                                stage5=True, train_bn=config.TRAIN_BN)\r\n\r\n\r\n  However, compare to the resnet101, the deeper network of resnet152 can not perform the expected result, in other words the mAP is very low and predict results are terrible. Could anybody can help me how to fix the problem.\r\n\r\nMany thanks.\r\n\r\nKind regards\r\n\r\nWei\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/comments/435290736","html_url":"https://github.com/matterport/Mask_RCNN/issues/1081#issuecomment-435290736","issue_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/1081","id":435290736,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTI5MDczNg==","user":{"login":"enoceanwei","id":31890692,"node_id":"MDQ6VXNlcjMxODkwNjky","avatar_url":"https://avatars1.githubusercontent.com/u/31890692?v=4","gravatar_id":"","url":"https://api.github.com/users/enoceanwei","html_url":"https://github.com/enoceanwei","followers_url":"https://api.github.com/users/enoceanwei/followers","following_url":"https://api.github.com/users/enoceanwei/following{/other_user}","gists_url":"https://api.github.com/users/enoceanwei/gists{/gist_id}","starred_url":"https://api.github.com/users/enoceanwei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enoceanwei/subscriptions","organizations_url":"https://api.github.com/users/enoceanwei/orgs","repos_url":"https://api.github.com/users/enoceanwei/repos","events_url":"https://api.github.com/users/enoceanwei/events{/privacy}","received_events_url":"https://api.github.com/users/enoceanwei/received_events","type":"User","site_admin":false},"created_at":"2018-11-02T07:09:35Z","updated_at":"2018-11-02T07:09:35Z","author_association":"NONE","body":"@simonhandsome\r\n\r\nThank you for your info again, there is still a couple of questions by following your above replies.\r\n\r\n1. I am sure that I have changed the resnet152 architecture by the resnet paper,  the brief details similar like below: \r\n\"\r\nin <mrcnn/config.py> file, I changed the backbone name\r\n$ BACKBONE = \"resnet152\"\r\n\r\nin <mrcnn/model.py> file, I add the reset152 graph function.\r\ndef resnet152_graph(input_image, architecture, stage5=False, train_bn=True):\r\n\r\nin <mrcnn/model.py> file, I revised these follow part:\r\nif callable(config.BACKBONE):\r\n_, C2, C3, C4, C5 = config.BACKBONE(input_image, stage5=True,\r\ntrain_bn=config.TRAIN_BN)\r\nelse:\r\n_, C2, C3, C4, C5 = resnet152_graph(input_image, config.BACKBONE,\r\nstage5=True, train_bn=config.TRAIN_BN)\r\n\"\r\n2. Follow your opinion, the release file 'mask_rcnn_coco.h5' was trained by coco datasets which are training by default resnet101 backbone in the matterport maskrcnn source code, I understand the right?\r\n    If I understand it correctly, I think I have two ways to train it. \r\n    First of all, I can train a new model on coco datasets from beginning to end by resnet152 architecture. (Problem: My machine is laptop, I worried about that training the coco datasets from begining is impossible.)\r\n    Secondly, I can find a  .h5 files, which had been trained on resnet152 backbone by someone else. \r\n(Problem: I can not find it right now)\r\n\r\n    However, both of above methods still need to load the weights in the source code <samples-->coco.py>. \r\n    \"\r\n        print(\"Loading weights \", model_path)\r\n        model.load_weights(model_path, by_name=True)\r\n    \"\r\n    My question is that how to avoid to load the pre-train model weight, I just want to train the new resnet152 model from 'scratch' (which is meaning that train from very beginning to end without using the pre-train model)"}}
{"actor":{"display_login":"enoceanwei"}}