{"action":"created","issue":{"url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/527","repository_url":"https://api.github.com/repos/matterport/Mask_RCNN","labels_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/527/labels{/name}","comments_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/527/comments","events_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/527/events","html_url":"https://github.com/matterport/Mask_RCNN/issues/527","id":320766175,"number":527,"title":"Training strategy ","user":{"login":"shikunyu8","id":30034854,"avatar_url":"https://avatars3.githubusercontent.com/u/30034854?v=4","gravatar_id":"","url":"https://api.github.com/users/shikunyu8","html_url":"https://github.com/shikunyu8","followers_url":"https://api.github.com/users/shikunyu8/followers","following_url":"https://api.github.com/users/shikunyu8/following{/other_user}","gists_url":"https://api.github.com/users/shikunyu8/gists{/gist_id}","starred_url":"https://api.github.com/users/shikunyu8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shikunyu8/subscriptions","organizations_url":"https://api.github.com/users/shikunyu8/orgs","repos_url":"https://api.github.com/users/shikunyu8/repos","events_url":"https://api.github.com/users/shikunyu8/events{/privacy}","received_events_url":"https://api.github.com/users/shikunyu8/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-05-07T11:16:34Z","updated_at":"2018-05-15T18:27:38Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nFirst, I wanna say thank you for providing this great implementation of Mask_RCNN. I am using this repo for a while but can't figure out a proper training strategy, so I hope someone can give me some suggestions.\r\n\r\nImage: CBIS-DDSM (X-ray images)  training:981, validation:250.\r\nRoughly one instance per image( highly class imbalance).\r\n\r\nA sample image and correspoing mask:\r\n<img src=\"https://user-images.githubusercontent.com/30034854/39698014-9d412d60-5225-11e8-9b08-1f7d5c082421.jpg\" width=\"250\" height=\"300\"> <img src=\"https://user-images.githubusercontent.com/30034854/39698008-981e1064-5225-11e8-9834-e2e4a16ab511.jpg\" width=\"250\" height=\"300\">\r\n\r\nMy Configurations:\r\nBACKBONE                       resnet101\r\nBATCH_SIZE                     2\r\nDETECTION_MIN_CONFIDENCE       0.7\r\nDETECTION_NMS_THRESHOLD        0.3\r\nIMAGE_MAX_DIM                  512\r\nIMAGE_MIN_DIM                  512\r\nIMAGE_RESIZE_MODE              square\r\nIMAGE_SHAPE                    [512 512   3]\r\nLEARNING_MOMENTUM              0.9\r\nLEARNING_RATE                  0.001\r\nMEAN_PIXEL                     [53.129 53.129 53.129]\r\nROI_POSITIVE_RATIO             0.33\r\nRPN_ANCHOR_RATIOS              [0.5, 1, 2]\r\nRPN_ANCHOR_SCALES              (16, 32, 64, 128, 256)\r\nRPN_NMS_THRESHOLD              0.7\r\nRPN_TRAIN_ANCHORS_PER_IMAGE    512\r\nTRAIN_ROIS_PER_IMAGE           320\r\nWEIGHT_DECAY                   0.0001\r\n\r\nAugmentation:\r\naugmentation = iaa.SomeOf((0, 2), [\r\n    iaa.Fliplr(0.5),\r\n    iaa.Flipud(0.5),])\r\n\r\nI read many issues in this repo, and I summarized several strategies that could possibly help me.\r\n1. Use data augmentation.\r\n2. Innit with coco weights.\r\n3. Only train classifier without changing the backbone weights of coco(this is from Andrew Ng's onlie course, that he said if you only have several hundred images, only train the classifier is a good idea)\r\n4. Try to generate more positive proposals.\r\n\r\nBased on these suggestions, I did some incomplete research. But I haven't got nice predictions.\r\n"},"comment":{"url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/comments/389266958","html_url":"https://github.com/matterport/Mask_RCNN/issues/527#issuecomment-389266958","issue_url":"https://api.github.com/repos/matterport/Mask_RCNN/issues/527","id":389266958,"user":{"login":"patrick-12sigma","id":32552339,"avatar_url":"https://avatars1.githubusercontent.com/u/32552339?v=4","gravatar_id":"","url":"https://api.github.com/users/patrick-12sigma","html_url":"https://github.com/patrick-12sigma","followers_url":"https://api.github.com/users/patrick-12sigma/followers","following_url":"https://api.github.com/users/patrick-12sigma/following{/other_user}","gists_url":"https://api.github.com/users/patrick-12sigma/gists{/gist_id}","starred_url":"https://api.github.com/users/patrick-12sigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrick-12sigma/subscriptions","organizations_url":"https://api.github.com/users/patrick-12sigma/orgs","repos_url":"https://api.github.com/users/patrick-12sigma/repos","events_url":"https://api.github.com/users/patrick-12sigma/events{/privacy}","received_events_url":"https://api.github.com/users/patrick-12sigma/received_events","type":"User","site_admin":false},"created_at":"2018-05-15T18:27:38Z","updated_at":"2018-05-15T18:27:38Z","author_association":"NONE","body":"There is the configuration that controls the relative weights of different losses [here](https://github.com/matterport/Mask_RCNN/blob/master/mrcnn/config.py#L169).\r\n\r\nYou mentioned a good point about the the impact of resizing the original image. It really depends on the statistical distribution of the size of the objects you would like to detect. I'd do some quick stats plot to determine if most of the objects to be detected are overwhelmingly small. Or plot the sizes of the false positives (missed GT) and see if they are all small objects."}}
{"actor":{"display_login":"patrick-12sigma"}}