{"id":17531105,"url":"https://github.com/milosgajdos/ncs","last_synced_at":"2025-04-23T20:41:43.026Z","repository":{"id":57551531,"uuid":"138915986","full_name":"milosgajdos/ncs","owner":"milosgajdos","description":"Movidius Neural Compute Stick V2.0 API Go bindings","archived":false,"fork":false,"pushed_at":"2020-02-25T21:07:48.000Z","size":21162,"stargazers_count":18,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T10:02:45.359Z","etag":null,"topics":["deep-learning","edge-computing","go","golang","inference-engine","movidius","neural-networks","usb"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/milosgajdos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-27T17:59:34.000Z","updated_at":"2024-03-01T09:55:45.000Z","dependencies_parsed_at":"2022-09-20T12:52:21.101Z","dependency_job_id":null,"html_url":"https://github.com/milosgajdos/ncs","commit_stats":null,"previous_names":["milosgajdos83/ncs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milosgajdos%2Fncs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milosgajdos%2Fncs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milosgajdos%2Fncs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milosgajdos%2Fncs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milosgajdos","download_url":"https://codeload.github.com/milosgajdos/ncs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250513271,"owners_count":21443190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","edge-computing","go","golang","inference-engine","movidius","neural-networks","usb"],"created_at":"2024-10-20T17:22:48.499Z","updated_at":"2025-04-23T20:41:43.007Z","avatar_url":"https://github.com/milosgajdos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ncs\n\n[![GoDoc](https://godoc.org/github.com/milosgajdos/ncs?status.svg)](https://godoc.org/github.com/milosgajdos/ncs)\n[![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\nNeural Compute Stick V2.0 API Go binding\n\n**NCSDK API V2 IS PARTIALLY BROKEN on macOS AT THE MOMENT -- EVERYTHING WORKS FINE ON LINUX**\n\nThe code in this repository has been tested on the following Linux OS:\n\n```\nDistributor ID:\tUbuntu\nDescription:\tUbuntu 16.04.5 LTS\nRelease:\t16.04\nCodename:\txenial\n\nLinux ubuntu-xenial 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux\n```\n\nThe Movidius NCSDK API coverage provided in this repo should give you all the tools to use Movidius NCS to perform Neural Network inference.\n\n# Quick start\n\nOn MacOS, clone `macos-V2` branch:\n\n```shell\n$ git clone -b macos-V2 https://github.com/milosgajdos/ncsdk.git\n```\n\nBuild ncsdk API libraries:\n\n```shell\n$ cd api/src \u0026\u0026 sudo make basicinstall pythoninstall\n```\n\nTest NCSDK example:\n\n```shell\n$ cd ../../examples/apps/hello_ncs_cpp/ \u0026\u0026 make run\n```\n\n# Example Go program\n\nThe example below shows how to create and destroy the basic resource types the NCSDK API 2.0 provides. For more complex examples please see [examples](./examples)\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/milosgajdos/ncs\"\n)\n\nfunc main() {\n\tvar err error\n\tdefer func() {\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"Error: %s\", err)\n\t\t}\n\t}()\n\tlog.Printf(\"Attempting to create NCS device handle\")\n\tdev, e := ncs.NewDevice(0)\n\tif e != nil {\n                err = e\n\t\treturn\n\t}\n\tdefer dev.Destroy()\n\tlog.Printf(\"NCS device handle successfully created\")\n\n\tlog.Printf(\"Attempting to open NCS device\")\n\terr = dev.Open()\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer dev.Close()\n\tlog.Printf(\"NCS device successfully opened\")\n\n\tlog.Printf(\"Attempting to create NCS graph handle\")\n\tgraph, e := ncs.NewGraph(\"NCSGraph\")\n\tif e != nil {\n                err = e\n\t\treturn\n\t}\n\tdefer graph.Destroy()\n\tlog.Printf(\"NCS graph handle successfully created\")\n\n\tlog.Printf(\"Attempting to create NCS FIFO handle\")\n\tfifo, e := ncs.NewFifo(\"TestFIFO\", ncs.FifoHostRO)\n\tdefer fifo.Destroy()\n\tif e != nil {\n                err = e\n\t\treturn\n\t}\n\tlog.Printf(\"NCS FIFO handle successfully created\")\n}\n```\n\nIf your Movidius NCS device is plugged in you should see the following output when running the program above:\n\n```console\n2018/08/27 00:43:00 Attempting to create NCS device handle\n2018/08/27 00:43:00 NCS device handle successfully created\n2018/08/27 00:43:00 Attempting to open NCS device\n2018/08/27 00:43:03 NCS device successfully opened\n2018/08/27 00:43:03 Attempting to create NCS graph handle\n2018/08/27 00:43:03 NCS graph handle successfully created\n2018/08/27 00:43:03 Attempting to create NCS FIFO handle\n2018/08/27 00:43:03 NCS FIFO handle successfully created\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilosgajdos%2Fncs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilosgajdos%2Fncs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilosgajdos%2Fncs/lists"}