{"id":29192481,"url":"https://github.com/nihui/orion-o6-rvm-cam-stream","last_synced_at":"2025-07-02T01:37:04.398Z","repository":{"id":289114507,"uuid":"970170614","full_name":"nihui/orion-o6-rvm-cam-stream","owner":"nihui","description":null,"archived":false,"fork":false,"pushed_at":"2025-04-21T15:55:06.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-21T16:36:48.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nihui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-21T15:37:03.000Z","updated_at":"2025-04-21T15:55:10.000Z","dependencies_parsed_at":"2025-04-21T16:48:01.077Z","dependency_job_id":null,"html_url":"https://github.com/nihui/orion-o6-rvm-cam-stream","commit_stats":null,"previous_names":["nihui/orion-o6-rvm-cam-stream"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nihui/orion-o6-rvm-cam-stream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Forion-o6-rvm-cam-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Forion-o6-rvm-cam-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Forion-o6-rvm-cam-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Forion-o6-rvm-cam-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nihui","download_url":"https://codeload.github.com/nihui/orion-o6-rvm-cam-stream/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nihui%2Forion-o6-rvm-cam-stream/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263061200,"owners_count":23407599,"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":[],"created_at":"2025-07-02T01:37:03.912Z","updated_at":"2025-07-02T01:37:04.387Z","avatar_url":"https://github.com/nihui.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# orion-o6-rvm-cam-stream\n\nThis is a sample project for real-time video segmentation of a USB camera and streaming it in jpg format over HTTP. It supports neural network inference on the CPU/GPU/NPU of Orion O6.\n\n【orion o6 CPU GPU NPU 摄像头实时 RVM 人像分割和 http 推流】https://www.bilibili.com/video/BV1uN59zSEuf\n\nThe following steps should be performed on Orion O6.\n\n## build and install ncnn\n\nhttps://github.com/Tencent/ncnn/wiki/how-to-build#build-for-linux\n\n```shell\ngit clone https://github.com/Tencent/ncnn.git\ncd ncnn\nmkdir build\ncd build\ncmake ..\nmake -j12\nmake install\n```\n\n## setup opencv-mobile\n\n```shell\nwget https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-debian-bookworm-aarch64.zip\nunzip -q opencv-mobile-4.11.0-debian-bookworm-aarch64.zip\n```\n\n## build this project\n\n```shell\ngit clone https://github.com/nihui/orion-o6-rvm-cam-stream\ncd orion-o6-rvm-cam-stream\nmkdir build\ncd build\ncmake ..\nmake\n```\n\n## cam stream with browser\n\n```shell\ncd orion-o6-rvm-cam-stream/build\n./test\n```\n\nThis program will open usb camera (/dev/video3) ➡️ rvm (robust human video matting) portrait on npu ➡️ stream jpeg on http\n\nOpen the streaming url with browser, and you can see the rvm result\n\nSample output\n```\n[0 Mali-G720-Immortalis]  queueC=0[2]  queueG=0[2]  queueT=0[2]\n[0 Mali-G720-Immortalis]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0\n[0 Mali-G720-Immortalis]  fp16-p/s/u/a=1/1/1/1  int8-p/s/u/a=1/1/1/1\n[0 Mali-G720-Immortalis]  subgroup=16(16~16)  ops=1/1/1/1/1/1/1/1/1/1\n[0 Mali-G720-Immortalis]  fp16-8x8x16/16x8x8/16x8x16/16x16x16=0/0/0/0\n[1 llvmpipe (LLVM 15.0.6, 128 bits)]  queueC=0[1]  queueG=0[1]  queueT=0[1]\n[1 llvmpipe (LLVM 15.0.6, 128 bits)]  bugsbn1=0  bugbilz=0  bugcopc=0  bugihfa=0\n[1 llvmpipe (LLVM 15.0.6, 128 bits)]  fp16-p/s/u/a=1/1/1/0  int8-p/s/u/a=1/1/1/1\n[1 llvmpipe (LLVM 15.0.6, 128 bits)]  subgroup=4(4~4)  ops=1/1/1/1/1/1/0/1/0/0\n[1 llvmpipe (LLVM 15.0.6, 128 bits)]  fp16-8x8x16/16x8x8/16x8x16/16x16x16=0/0/0/0\n   devpath = /dev/video3\n   driver = uvcvideo\n   card = ESP UVC Device: \n   bus_info = usb-xhci-hcd.2.auto-1\n   version = 6012c\n   capabilities = 84a00001\n   device_caps = 4200001\n   fmt = Motion-JPEG  47504a4d\n       size = 320 x 240   95.00\n       size = 640 x 480   83.75\n       size = 480 x 320   87.50\n       size = 320 x 240   95.00\n           fps = 1 / 15  ~   1 / 15  (+1 +15)   15.00\ncap_pixelformat = 47504a4d  MJPG\ncap_width = 320\ncap_height = 240\nbytesperline: 0\ncap_numerator = 1\ncap_denominator = 15\nrequestbuffers.count = 3\nstreaming at http://127.0.0.1:7766\nstreaming at http://192.168.1.7:7766\nstreaming at http://127.0.0.1:7766\nopencv-mobile HW JPG encoder with v4l cix\nclient accepted 192.168.1.54 41256\n```\n\n## some note for main.cpp\n\nchange camera device index and resolution\n```cpp\ncv::VideoCapture cap;\ncap.set(cv::CAP_PROP_FRAME_WIDTH, 240);\ncap.set(cv::CAP_PROP_FRAME_HEIGHT, 240);\ncap.open(3);\n```\n\nchange http streaming port\n```\ncv::VideoWriter http;\nhttp.open(\"httpjpg\", 7766);\n```\n\nchange rvm inference backend\n```\n// rvm_cpu.run(bgr_512, out);\n// rvm_gpu.run(bgr_512, out);\nrvm_npu.run(bgr_512, out);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihui%2Forion-o6-rvm-cam-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnihui%2Forion-o6-rvm-cam-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihui%2Forion-o6-rvm-cam-stream/lists"}