{"action":"created","comment":{"url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/comments/232615872","pull_request_review_id":173849044,"id":232615872,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjYxNTg3Mg==","diff_hunk":"@@ -0,0 +1,119 @@\n+from __future__ import print_function\n+import sys\n+import os\n+from argparse import ArgumentParser\n+import cv2\n+import numpy as np\n+import logging as log\n+from openvino.inference_engine import IENetwork, IEPlugin\n+\n+\n+def build_argparser():\n+    parser = ArgumentParser()\n+    parser.add_argument(\"-m\", \"--model\", help = \"Path to an .xml \\\n+        file with a trained model.\", required = True, type = str)\n+    parser.add_argument(\"-w\", \"--weights\", help = \"Path to an .bin file \\\n+        with a trained weights.\", required = True, type = str)\n+    parser.add_argument(\"-i\", \"--input\", help = \"Path to a folder with \\\n+        images or path to an image files\", required = True, type = str, nargs = \"+\")\n+    parser.add_argument(\"-l\", \"--cpu_extension\", help = \"MKLDNN \\\n+        (CPU)-targeted custom layers.Absolute path to a shared library \\\n+        with the kernels implementation\", type = str, default = None)\n+    parser.add_argument(\"-pp\", \"--plugin_dir\", help = \"Path to a plugin \\\n+        folder\", type = str, default = None)\n+    parser.add_argument(\"-d\", \"--device\", help = \"Specify the target \\\n+        device to infer on; CPU, GPU, FPGA or MYRIAD is acceptable. \\\n+        Sample will look for a suitable plugin for device specified \\\n+        (CPU by default)\", default = \"CPU\", type = str)\n+    parser.add_argument(\"--labels\", help = \"Labels mapping file\",\n+        default = None, type = str)\n+    parser.add_argument(\"-nt\", \"--number_top\", help = \"Number of top results\",\n+        default = 10, type = int)\n+    parser.add_argument(\"-ni\", \"--number_iter\", help = \"Number of inference \\\n+        iterations\", default = 1, type = int)\n+    parser.add_argument(\"-pc\", \"--perf_counts\", help = \"Report performance \\\n+        counters\", action = \"store_true\", default = False)\n+\n+    return parser\n+\n+def Convert_Image(net, args, log):\n+\tinput_blob = next(iter(net.inputs))\n+    n, c, h, w = net.inputs[input_blob]\n+    images = np.ndarray(shape=(n, c, h, w))\n+    for i in range(n):\n+        image = cv2.imread(args.input[i])\n+        if image.shape[:-1] != (h, w):\n+            log.warning(\"Image {} is resized from {} to {}\".format(args.input[i], image.shape[:-1], (h, w)))\n+            image = cv2.resize(image, (w, h))\n+        image = image.transpose((2, 0, 1))  # Change data layout from HWC to CHW\n+        images[i] = image\n+    \n+    return images\n+\n+def Model_loading(log):\n+    args=build_argparser().parse_args()\n+    model_xml=args.model\n+    model_bin =args.weights\n+    plugin = IEPlugin(device=args.device, plugin_dirs=args.plugin_dir)\n+    if args.cpu_extension and 'CPU' in args.device:\n+    \tplugin.add_cpu_extension(args.cpu_extension)\n+\t#log.info(\"Loading network files:\\n\\t{}\\n\\t{}\".format(model_xml, model_bin))\n+    net = IENetwork.from_ir(model=model_xml, weights=model_bin)\n+    if \"CPU\" in plugin.device:\n+        supported_layers = plugin.get_supported_layers(net)\n+        not_supported_layers = [l for l in net.layers.keys() if l not in  supported_layers]\n+        if len(not_supported_layers) != 0:\n+        \t\"\"\"\n+        \tlog.error(\"Following layers are not supported by the plugin for \\","path":"script_sync.py","position":67,"original_position":67,"commit_id":"085debcf4622c352beb811037b931ad7288191c3","original_commit_id":"085debcf4622c352beb811037b931ad7288191c3","user":{"login":"FenixFly","id":4303485,"node_id":"MDQ6VXNlcjQzMDM0ODU=","avatar_url":"https://avatars3.githubusercontent.com/u/4303485?v=4","gravatar_id":"","url":"https://api.github.com/users/FenixFly","html_url":"https://github.com/FenixFly","followers_url":"https://api.github.com/users/FenixFly/followers","following_url":"https://api.github.com/users/FenixFly/following{/other_user}","gists_url":"https://api.github.com/users/FenixFly/gists{/gist_id}","starred_url":"https://api.github.com/users/FenixFly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FenixFly/subscriptions","organizations_url":"https://api.github.com/users/FenixFly/orgs","repos_url":"https://api.github.com/users/FenixFly/repos","events_url":"https://api.github.com/users/FenixFly/events{/privacy}","received_events_url":"https://api.github.com/users/FenixFly/received_events","type":"User","site_admin":false},"body":"раскомментировать","created_at":"2018-11-12T11:03:28Z","updated_at":"2018-11-12T11:03:28Z","html_url":"https://github.com/itlab-vision/openvino-dl-benchmark/pull/4#discussion_r232615872","pull_request_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/comments/232615872"},"html":{"href":"https://github.com/itlab-vision/openvino-dl-benchmark/pull/4#discussion_r232615872"},"pull_request":{"href":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/4","id":229966178,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5OTY2MTc4","html_url":"https://github.com/itlab-vision/openvino-dl-benchmark/pull/4","diff_url":"https://github.com/itlab-vision/openvino-dl-benchmark/pull/4.diff","patch_url":"https://github.com/itlab-vision/openvino-dl-benchmark/pull/4.patch","issue_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/issues/4","number":4,"state":"open","locked":false,"title":"script_sync","user":{"login":"roma-roma97","id":36074634,"node_id":"MDQ6VXNlcjM2MDc0NjM0","avatar_url":"https://avatars0.githubusercontent.com/u/36074634?v=4","gravatar_id":"","url":"https://api.github.com/users/roma-roma97","html_url":"https://github.com/roma-roma97","followers_url":"https://api.github.com/users/roma-roma97/followers","following_url":"https://api.github.com/users/roma-roma97/following{/other_user}","gists_url":"https://api.github.com/users/roma-roma97/gists{/gist_id}","starred_url":"https://api.github.com/users/roma-roma97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roma-roma97/subscriptions","organizations_url":"https://api.github.com/users/roma-roma97/orgs","repos_url":"https://api.github.com/users/roma-roma97/repos","events_url":"https://api.github.com/users/roma-roma97/events{/privacy}","received_events_url":"https://api.github.com/users/roma-roma97/received_events","type":"User","site_admin":false},"body":"Пока не работает вывод.","created_at":"2018-11-11T17:36:22Z","updated_at":"2018-11-12T11:03:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff40ae87e43cf4a7d68fdc3324c744a216307e3d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/4/commits","review_comments_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/4/comments","review_comment_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/issues/4/comments","statuses_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/statuses/085debcf4622c352beb811037b931ad7288191c3","head":{"label":"roma-roma97:script_sync","ref":"script_sync","sha":"085debcf4622c352beb811037b931ad7288191c3","user":{"login":"roma-roma97","id":36074634,"node_id":"MDQ6VXNlcjM2MDc0NjM0","avatar_url":"https://avatars0.githubusercontent.com/u/36074634?v=4","gravatar_id":"","url":"https://api.github.com/users/roma-roma97","html_url":"https://github.com/roma-roma97","followers_url":"https://api.github.com/users/roma-roma97/followers","following_url":"https://api.github.com/users/roma-roma97/following{/other_user}","gists_url":"https://api.github.com/users/roma-roma97/gists{/gist_id}","starred_url":"https://api.github.com/users/roma-roma97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roma-roma97/subscriptions","organizations_url":"https://api.github.com/users/roma-roma97/orgs","repos_url":"https://api.github.com/users/roma-roma97/repos","events_url":"https://api.github.com/users/roma-roma97/events{/privacy}","received_events_url":"https://api.github.com/users/roma-roma97/received_events","type":"User","site_admin":false},"repo":{"id":152773428,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI3NzM0Mjg=","name":"openvino-dl-benchmark","full_name":"roma-roma97/openvino-dl-benchmark","private":false,"owner":{"login":"roma-roma97","id":36074634,"node_id":"MDQ6VXNlcjM2MDc0NjM0","avatar_url":"https://avatars0.githubusercontent.com/u/36074634?v=4","gravatar_id":"","url":"https://api.github.com/users/roma-roma97","html_url":"https://github.com/roma-roma97","followers_url":"https://api.github.com/users/roma-roma97/followers","following_url":"https://api.github.com/users/roma-roma97/following{/other_user}","gists_url":"https://api.github.com/users/roma-roma97/gists{/gist_id}","starred_url":"https://api.github.com/users/roma-roma97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roma-roma97/subscriptions","organizations_url":"https://api.github.com/users/roma-roma97/orgs","repos_url":"https://api.github.com/users/roma-roma97/repos","events_url":"https://api.github.com/users/roma-roma97/events{/privacy}","received_events_url":"https://api.github.com/users/roma-roma97/received_events","type":"User","site_admin":false},"html_url":"https://github.com/roma-roma97/openvino-dl-benchmark","description":"Deep learning benchmark based on Intel Deep Learning Deployment Toolkit from OpenVINO toolkit [https://software.intel.com/en-us/openvino-toolkit]","fork":true,"url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark","forks_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/forks","keys_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/teams","hooks_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/hooks","issue_events_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/issues/events{/number}","events_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/events","assignees_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/assignees{/user}","branches_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/branches{/branch}","tags_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/tags","blobs_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/git/refs{/sha}","trees_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/statuses/{sha}","languages_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/languages","stargazers_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/stargazers","contributors_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/contributors","subscribers_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/subscribers","subscription_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/subscription","commits_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/commits{/sha}","git_commits_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/git/commits{/sha}","comments_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/comments{/number}","issue_comment_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/issues/comments{/number}","contents_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/contents/{+path}","compare_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/merges","archive_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/downloads","issues_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/issues{/number}","pulls_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/pulls{/number}","milestones_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/milestones{/number}","notifications_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/labels{/name}","releases_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/releases{/id}","deployments_url":"https://api.github.com/repos/roma-roma97/openvino-dl-benchmark/deployments","created_at":"2018-10-12T15:43:09Z","updated_at":"2018-11-06T03:01:05Z","pushed_at":"2018-11-11T17:33:49Z","git_url":"git://github.com/roma-roma97/openvino-dl-benchmark.git","ssh_url":"git@github.com:roma-roma97/openvino-dl-benchmark.git","clone_url":"https://github.com/roma-roma97/openvino-dl-benchmark.git","svn_url":"https://github.com/roma-roma97/openvino-dl-benchmark","homepage":null,"size":6,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"itlab-vision:master","ref":"master","sha":"027fb82f4fdadb3cd5c0ef381be0c81e2dd88e43","user":{"login":"itlab-vision","id":9713705,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk3MTM3MDU=","avatar_url":"https://avatars1.githubusercontent.com/u/9713705?v=4","gravatar_id":"","url":"https://api.github.com/users/itlab-vision","html_url":"https://github.com/itlab-vision","followers_url":"https://api.github.com/users/itlab-vision/followers","following_url":"https://api.github.com/users/itlab-vision/following{/other_user}","gists_url":"https://api.github.com/users/itlab-vision/gists{/gist_id}","starred_url":"https://api.github.com/users/itlab-vision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itlab-vision/subscriptions","organizations_url":"https://api.github.com/users/itlab-vision/orgs","repos_url":"https://api.github.com/users/itlab-vision/repos","events_url":"https://api.github.com/users/itlab-vision/events{/privacy}","received_events_url":"https://api.github.com/users/itlab-vision/received_events","type":"Organization","site_admin":false},"repo":{"id":151227323,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEyMjczMjM=","name":"openvino-dl-benchmark","full_name":"itlab-vision/openvino-dl-benchmark","private":false,"owner":{"login":"itlab-vision","id":9713705,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk3MTM3MDU=","avatar_url":"https://avatars1.githubusercontent.com/u/9713705?v=4","gravatar_id":"","url":"https://api.github.com/users/itlab-vision","html_url":"https://github.com/itlab-vision","followers_url":"https://api.github.com/users/itlab-vision/followers","following_url":"https://api.github.com/users/itlab-vision/following{/other_user}","gists_url":"https://api.github.com/users/itlab-vision/gists{/gist_id}","starred_url":"https://api.github.com/users/itlab-vision/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itlab-vision/subscriptions","organizations_url":"https://api.github.com/users/itlab-vision/orgs","repos_url":"https://api.github.com/users/itlab-vision/repos","events_url":"https://api.github.com/users/itlab-vision/events{/privacy}","received_events_url":"https://api.github.com/users/itlab-vision/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/itlab-vision/openvino-dl-benchmark","description":"Deep learning benchmark based on Intel Deep Learning Deployment Toolkit from OpenVINO toolkit [https://software.intel.com/en-us/openvino-toolkit]","fork":false,"url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark","forks_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/forks","keys_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/teams","hooks_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/hooks","issue_events_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/issues/events{/number}","events_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/events","assignees_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/assignees{/user}","branches_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/branches{/branch}","tags_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/tags","blobs_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/git/refs{/sha}","trees_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/statuses/{sha}","languages_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/languages","stargazers_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/stargazers","contributors_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/contributors","subscribers_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/subscribers","subscription_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/subscription","commits_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/commits{/sha}","git_commits_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/git/commits{/sha}","comments_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/comments{/number}","issue_comment_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/issues/comments{/number}","contents_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/contents/{+path}","compare_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/merges","archive_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/downloads","issues_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/issues{/number}","pulls_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls{/number}","milestones_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/milestones{/number}","notifications_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/labels{/name}","releases_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/releases{/id}","deployments_url":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/deployments","created_at":"2018-10-02T09:00:05Z","updated_at":"2018-10-24T12:54:13Z","pushed_at":"2018-11-12T05:37:11Z","git_url":"git://github.com/itlab-vision/openvino-dl-benchmark.git","ssh_url":"git@github.com:itlab-vision/openvino-dl-benchmark.git","clone_url":"https://github.com/itlab-vision/openvino-dl-benchmark.git","svn_url":"https://github.com/itlab-vision/openvino-dl-benchmark","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":4,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/4"},"html":{"href":"https://github.com/itlab-vision/openvino-dl-benchmark/pull/4"},"issue":{"href":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/issues/4"},"comments":{"href":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/itlab-vision/openvino-dl-benchmark/statuses/085debcf4622c352beb811037b931ad7288191c3"}},"author_association":"NONE"}}
{"actor":{"display_login":"FenixFly"}}