{"action":"created","issue":{"url":"https://api.github.com/repos/goncalopp/simple-ocr-opencv/issues/34","repository_url":"https://api.github.com/repos/goncalopp/simple-ocr-opencv","labels_url":"https://api.github.com/repos/goncalopp/simple-ocr-opencv/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/goncalopp/simple-ocr-opencv/issues/34/comments","events_url":"https://api.github.com/repos/goncalopp/simple-ocr-opencv/issues/34/events","html_url":"https://github.com/goncalopp/simple-ocr-opencv/issues/34","id":393739817,"node_id":"MDU6SXNzdWUzOTM3Mzk4MTc=","number":34,"title":"Accuracy exception","user":{"login":"Jambon1510","id":19289018,"node_id":"MDQ6VXNlcjE5Mjg5MDE4","avatar_url":"https://avatars0.githubusercontent.com/u/19289018?v=4","gravatar_id":"","url":"https://api.github.com/users/Jambon1510","html_url":"https://github.com/Jambon1510","followers_url":"https://api.github.com/users/Jambon1510/followers","following_url":"https://api.github.com/users/Jambon1510/following{/other_user}","gists_url":"https://api.github.com/users/Jambon1510/gists{/gist_id}","starred_url":"https://api.github.com/users/Jambon1510/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jambon1510/subscriptions","organizations_url":"https://api.github.com/users/Jambon1510/orgs","repos_url":"https://api.github.com/users/Jambon1510/repos","events_url":"https://api.github.com/users/Jambon1510/events{/privacy}","received_events_url":"https://api.github.com/users/Jambon1510/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-23T10:39:41Z","updated_at":"2018-12-23T18:37:25Z","closed_at":null,"author_association":"NONE","body":"**Context**\r\nHello \r\nI tried the below image\r\n![passwordpad](https://user-images.githubusercontent.com/19289018/50382728-030b6f00-06e1-11e9-82d2-71f34e488ed3.png)\r\n\r\nwith Python 3\r\n\r\n**current behavior**\r\nWhen grounding via example_grounding.py the image above  then launching example.py by the same above image, I got below exception\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"example_amundi.py\", line 17, in <module>\r\n    print(\"accuracy:\", accuracy(test_image.ground.classes, test_classes))\r\n  File \"/mnt/Documents/jb/Dev/python/projects/moneygator/test/castor/ocr/simple-ocr-opencv-master/simpleocr/ocr.py\", line 36, in accuracy\r\n    raise Exception(\"expected \" + str(expected.shape) + \", got \" + str(result.shape))\r\nException: expected (10, 1), got (18, 1)\r\n```\r\n\r\n**expected behavior**\r\nit should not trigger the exception except if I am doing something bad (does that need more numbers for grounding?)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/goncalopp/simple-ocr-opencv/issues/comments/449655799","html_url":"https://github.com/goncalopp/simple-ocr-opencv/issues/34#issuecomment-449655799","issue_url":"https://api.github.com/repos/goncalopp/simple-ocr-opencv/issues/34","id":449655799,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTY1NTc5OQ==","user":{"login":"goncalopp","id":100023,"node_id":"MDQ6VXNlcjEwMDAyMw==","avatar_url":"https://avatars2.githubusercontent.com/u/100023?v=4","gravatar_id":"","url":"https://api.github.com/users/goncalopp","html_url":"https://github.com/goncalopp","followers_url":"https://api.github.com/users/goncalopp/followers","following_url":"https://api.github.com/users/goncalopp/following{/other_user}","gists_url":"https://api.github.com/users/goncalopp/gists{/gist_id}","starred_url":"https://api.github.com/users/goncalopp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goncalopp/subscriptions","organizations_url":"https://api.github.com/users/goncalopp/orgs","repos_url":"https://api.github.com/users/goncalopp/repos","events_url":"https://api.github.com/users/goncalopp/events{/privacy}","received_events_url":"https://api.github.com/users/goncalopp/received_events","type":"User","site_admin":false},"created_at":"2018-12-23T18:37:25Z","updated_at":"2018-12-23T18:37:25Z","author_association":"OWNER","body":"What that exception is telling you is that the number of recognized segments is different from the expected. In this case, it expected 10 segments from grounding (which makes sense for the image), but it detected 18 in the image. If you used the algorithm for the grounding (as opposed to manually calculating rectangles), then it's likely that it's due to different settings used when running both.\r\n\r\nYou can try to figure out what's happening by running with `show_steps=True` (see `example.py`)"}}
{"actor":{"display_login":"goncalopp"}}