{"action":"created","issue":{"url":"https://api.github.com/repos/AlexeyAB/darknet/issues/383","repository_url":"https://api.github.com/repos/AlexeyAB/darknet","labels_url":"https://api.github.com/repos/AlexeyAB/darknet/issues/383/labels{/name}","comments_url":"https://api.github.com/repos/AlexeyAB/darknet/issues/383/comments","events_url":"https://api.github.com/repos/AlexeyAB/darknet/issues/383/events","html_url":"https://github.com/AlexeyAB/darknet/issues/383","id":295844774,"number":383,"title":"Detections changing based on portion of the image being exposed","user":{"login":"harish-khollam","id":33411314,"avatar_url":"https://avatars2.githubusercontent.com/u/33411314?v=4","gravatar_id":"","url":"https://api.github.com/users/harish-khollam","html_url":"https://github.com/harish-khollam","followers_url":"https://api.github.com/users/harish-khollam/followers","following_url":"https://api.github.com/users/harish-khollam/following{/other_user}","gists_url":"https://api.github.com/users/harish-khollam/gists{/gist_id}","starred_url":"https://api.github.com/users/harish-khollam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harish-khollam/subscriptions","organizations_url":"https://api.github.com/users/harish-khollam/orgs","repos_url":"https://api.github.com/users/harish-khollam/repos","events_url":"https://api.github.com/users/harish-khollam/events{/privacy}","received_events_url":"https://api.github.com/users/harish-khollam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-02-09T11:48:28Z","updated_at":"2018-02-21T10:42:25Z","closed_at":null,"author_association":"NONE","body":"Hello @AlexeyAB,\r\nI have successfully built a Pipe detection model using YOLO2 on high resolution images.\r\n\r\ncfg file consists following parameters:\r\nhight: 640\r\nwidth: 640\r\nrandom: 1\r\nthreshold: 0.6\r\n\r\nThe model is doing pretty good on large pipes with 100 % accuracy. But if i test it on cluster of small pipes the accuracy decreases.\r\nAs an experiment i masked certain portions of the image and used for test. The model did pretty well as compared to unmasked.\r\n\r\nFollowing are two images:\r\n\r\n1. Unmasked\r\nAs you see in the following image the model is able to detect only 1 pipe in the middle cluster. \r\n![unmasked1](https://user-images.githubusercontent.com/33411314/36025631-bb8c267c-0db9-11e8-9d59-b7cda704fe46.png)\r\n\r\n2. Masked\r\nAs soon as i blur the surrounding area ; it is able to detect more pipes.\r\n![masked1](https://user-images.githubusercontent.com/33411314/36025815-77f67c68-0dba-11e8-8a48-b1d08d533d4f.png)\r\n\r\nSimilar phenomenon is observed when different area of same image is masked. \r\nWhy does the model perform poorly when exposed to full image as compared to exposing a part of image ? \r\nAre there some parameter i can tweak for such use case. "},"comment":{"url":"https://api.github.com/repos/AlexeyAB/darknet/issues/comments/367285186","html_url":"https://github.com/AlexeyAB/darknet/issues/383#issuecomment-367285186","issue_url":"https://api.github.com/repos/AlexeyAB/darknet/issues/383","id":367285186,"user":{"login":"TheMikeyR","id":1436625,"avatar_url":"https://avatars2.githubusercontent.com/u/1436625?v=4","gravatar_id":"","url":"https://api.github.com/users/TheMikeyR","html_url":"https://github.com/TheMikeyR","followers_url":"https://api.github.com/users/TheMikeyR/followers","following_url":"https://api.github.com/users/TheMikeyR/following{/other_user}","gists_url":"https://api.github.com/users/TheMikeyR/gists{/gist_id}","starred_url":"https://api.github.com/users/TheMikeyR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheMikeyR/subscriptions","organizations_url":"https://api.github.com/users/TheMikeyR/orgs","repos_url":"https://api.github.com/users/TheMikeyR/repos","events_url":"https://api.github.com/users/TheMikeyR/events{/privacy}","received_events_url":"https://api.github.com/users/TheMikeyR/received_events","type":"User","site_admin":false},"created_at":"2018-02-21T10:42:25Z","updated_at":"2018-02-21T10:42:25Z","author_association":"NONE","body":"@AlexeyAB I'm training on a P2.xlarge aws server,  with 11439 MiB available memory (Tesla k80), I've tried to use your custom cfg (most recent linked), but I get the `CUDA ERROR: out of memory` error when resizing to 896x896, it's funny because it initialised to 1024x1024 and it trained fine. I believe I'm using the correct tiny-yolo-voc.conv.13.\r\nMy image size is 2208x1242\r\nMy cfg:\r\n```\r\n[net]\r\nbatch=64\r\nsubdivisions=16\r\nwidth=832\r\nheight=832\r\nchannels=3\r\nmomentum=0.9\r\ndecay=0.0005\r\nangle=0\r\nsaturation = 1.5\r\nexposure = 1.5\r\nhue=.1\r\n\r\nlearning_rate=0.0001\r\nmax_batches = 45000\r\npolicy=steps\r\nsteps=100,1000,4000\r\nscales=10,.1,.1\r\n\r\n[convolutional]\r\nbatch_normalize=1\r\nfilters=32\r\nsize=3\r\nstride=1\r\npad=1\r\nactivation=leaky\r\n\r\n[maxpool]\r\nsize=2\r\nstride=2\r\n\r\n[convolutional]\r\nbatch_normalize=1\r\nfilters=64\r\nsize=3\r\nstride=1\r\npad=1\r\nactivation=leaky\r\n\r\n[maxpool]\r\nsize=2\r\nstride=2\r\n\r\n[convolutional]\r\nbatch_normalize=1\r\nfilters=128\r\nsize=3\r\nstride=1\r\npad=1\r\nactivation=leaky\r\n\r\n[convolutional]\r\nbatch_normalize=1\r\nfilters=64\r\nsize=1\r\nstride=1\r\npad=1\r\nactivation=leaky\r\n\r\n[convolutional]\r\nbatch_normalize=1\r\nfilters=128\r\nsize=3\r\nstride=1\r\npad=1\r\nactivation=leaky\r\n\r\n[maxpool]\r\nsize=2\r\nstride=2\r\n\r\n[convolutional]\r\nbatch_normalize=1\r\nfilters=256\r\nsize=3\r\nstride=1\r\npad=1\r\nactivation=leaky\r\n\r\n[convolutional]\r\nbatch_normalize=1\r\nfilters=128\r\nsize=1\r\nstride=1\r\npad=1\r\nactivation=leaky\r\n\r\n[convolutional]\r\nbatch_normalize=1\r\nfilters=256\r\nsize=3\r\nstride=1\r\npad=1\r\nactivation=leaky\r\n\r\n[maxpool]\r\nsize=2\r\nstride=2\r\n\r\n[convolutional]\r\nbatch_normalize=1\r\nfilters=512\r\nsize=3\r\nstride=1\r\npad=1\r\nactivation=leaky\r\n\r\n###########\r\n\r\n[convolutional]\r\nbatch_normalize=1\r\nsize=3\r\nstride=1\r\npad=1\r\nfilters=512\r\nactivation=leaky\r\n\r\n[convolutional]\r\nsize=1\r\nstride=1\r\npad=1\r\nfilters=30\r\nactivation=linear\r\n\r\n[region]\r\nanchors = 0.47,0.77, 0.55,0.98, 0.70,1.15, 0.74,0.79, 1.06,1.04\r\nbias_match=1\r\nclasses=1\r\ncoords=4\r\nnum=5\r\nsoftmax=1\r\njitter=.2\r\nrescore=1\r\nsmall_object=1\r\nmax=400\r\n\r\nobject_scale=5\r\nnoobject_scale=1\r\nclass_scale=1\r\ncoord_scale=1\r\n\r\nabsolute=1\r\nthresh = .6\r\nrandom=1\r\n``` \r\n\r\nStart of training:\r\n```\r\n./darknet detector train blip_both.data tiny_yolo_custom_alexey.cfg tiny-yolo-vo\r\nc.conv.13                                                                                                         \r\ntiny_yolo_custom_alexey\r\nlayer     filters    size              input                output\r\n    0 conv     32  3 x 3 / 1   832 x 832 x   3   ->   832 x 832 x  32\r\n    1 max          2 x 2 / 2   832 x 832 x  32   ->   416 x 416 x  32\r\n    2 conv     64  3 x 3 / 1   416 x 416 x  32   ->   416 x 416 x  64\r\n    3 max          2 x 2 / 2   416 x 416 x  64   ->   208 x 208 x  64\r\n    4 conv    128  3 x 3 / 1   208 x 208 x  64   ->   208 x 208 x 128\r\n    5 conv     64  1 x 1 / 1   208 x 208 x 128   ->   208 x 208 x  64\r\n    6 conv    128  3 x 3 / 1   208 x 208 x  64   ->   208 x 208 x 128\r\n    7 max          2 x 2 / 2   208 x 208 x 128   ->   104 x 104 x 128\r\n    8 conv    256  3 x 3 / 1   104 x 104 x 128   ->   104 x 104 x 256\r\n    9 conv    128  1 x 1 / 1   104 x 104 x 256   ->   104 x 104 x 128\r\n   10 conv    256  3 x 3 / 1   104 x 104 x 128   ->   104 x 104 x 256\r\n   11 max          2 x 2 / 2   104 x 104 x 256   ->    52 x  52 x 256\r\n   12 conv    512  3 x 3 / 1    52 x  52 x 256   ->    52 x  52 x 512\r\n   13 conv    512  3 x 3 / 1    52 x  52 x 512   ->    52 x  52 x 512\r\n   14 conv     30  1 x 1 / 1    52 x  52 x 512   ->    52 x  52 x  30\r\n   15 detection\r\nLoading weights from tiny-yolo-voc.conv.13...\r\n seen 64 \r\nDone!\r\nLearning Rate: 0.0001, Momentum: 0.9, Decay: 0.0005\r\nResizing\r\n1024\r\nLoaded: 45.075714 seconds\r\nRegion Avg IOU: 0.079985, Class: 1.000000, Obj: 0.498549, No Obj: 0.500154, Avg Recall: 0.000000,  count: 88\r\nRegion Avg IOU: 0.090546, Class: 1.000000, Obj: 0.498464, No Obj: 0.500142, Avg Recall: 0.000000,  count: 60\r\nRegion Avg IOU: 0.120469, Class: 1.000000, Obj: 0.498516, No Obj: 0.500144, Avg Recall: 0.000000,  count: 76\r\n```\r\n\r\nEnd of training due to error:\r\n```\r\n9: 77.087448, 273.408600 avg, 0.000100 rate, 68.094284 seconds, 576 images\r\nLoaded: 0.000052 seconds\r\nRegion Avg IOU: 0.131572, Class: 1.000000, Obj: 0.165749, No Obj: 0.167225, Avg Recall: 0.011765,  count: 85\r\nRegion Avg IOU: 0.140189, Class: 1.000000, Obj: 0.165928, No Obj: 0.167228, Avg Recall: 0.000000,  count: 44\r\nRegion Avg IOU: 0.142925, Class: 1.000000, Obj: 0.165996, No Obj: 0.167226, Avg Recall: 0.025316,  count: 79\r\nRegion Avg IOU: 0.103536, Class: 1.000000, Obj: 0.166065, No Obj: 0.167232, Avg Recall: 0.000000,  count: 24\r\nRegion Avg IOU: 0.113124, Class: 1.000000, Obj: 0.166023, No Obj: 0.167230, Avg Recall: 0.000000,  count: 38\r\nRegion Avg IOU: 0.140396, Class: 1.000000, Obj: 0.164977, No Obj: 0.167221, Avg Recall: 0.000000,  count: 73\r\nRegion Avg IOU: 0.131264, Class: 1.000000, Obj: 0.165162, No Obj: 0.167234, Avg Recall: 0.000000,  count: 134\r\nRegion Avg IOU: 0.149730, Class: 1.000000, Obj: 0.165761, No Obj: 0.167245, Avg Recall: 0.000000,  count: 94\r\nRegion Avg IOU: 0.148957, Class: 1.000000, Obj: 0.165370, No Obj: 0.167223, Avg Recall: 0.000000,  count: 68\r\nRegion Avg IOU: 0.130500, Class: 1.000000, Obj: 0.165454, No Obj: 0.167231, Avg Recall: 0.000000,  count: 78\r\nRegion Avg IOU: 0.126774, Class: 1.000000, Obj: 0.165550, No Obj: 0.167231, Avg Recall: 0.000000,  count: 110\r\nRegion Avg IOU: 0.125435, Class: 1.000000, Obj: 0.165480, No Obj: 0.167242, Avg Recall: 0.000000,  count: 39\r\nRegion Avg IOU: 0.113545, Class: 1.000000, Obj: 0.165656, No Obj: 0.167226, Avg Recall: 0.000000,  count: 118\r\nRegion Avg IOU: 0.122508, Class: 1.000000, Obj: 0.165301, No Obj: 0.167229, Avg Recall: 0.000000,  count: 70\r\nRegion Avg IOU: 0.134069, Class: 1.000000, Obj: 0.165200, No Obj: 0.167213, Avg Recall: 0.000000,  count: 73\r\nRegion Avg IOU: 0.129905, Class: 1.000000, Obj: 0.165304, No Obj: 0.167223, Avg Recall: 0.000000,  count: 65\r\n10: 57.855984, 251.853333 avg, 0.000100 rate, 67.484894 seconds, 640 images\r\nResizing\r\n896\r\nCUDA Error: out of memory\r\ndarknet: ./src/cuda.c:36: check_error: Assertion `0' failed.\r\nAborted (core dumped)\r\n```"}}
{"actor":{"display_login":"TheMikeyR"}}