Coder Social home page Coder Social logo

ar-lab's Introduction

参赛作品名

【隔空取人】【AI创造营】【mixlab】

An AR+ML prototype

粘贴到桌面 粘贴到微信

作品简介

手机对准某人,确认要“收集”的他/她,然后对准电脑桌面对某个位置,即可把他/她贴到电脑桌面上!~~~

使用方式

1 需要安装nodejs、python的开发环境,还有electron

2 启动服务端

cd server
pip install -r requirements.txt
python main.py

3 启动客户端

cd client
npm i
npm start

** 由于新增了自动化库robotjs,需要运行下以下:

npm i robotjs
npm i -D electron-rebuild
npm install -g node-gyp
npx electron-rebuild -f -t prod,optional,dev -w robotjs

4 首次运行在终端中输入本机密码,生成https证书。

手机跟电脑需在同一个局域网里,手机打开网站

   🔒    ❨https❩ Creating server at localhost with locally-trusted certificates.
   📜    ❨auto-encrypt-localhost❩ Local development TLS certificate exists.
   🔒    ❨https❩ Created HTTPS server.
   ✨    ❨auto-encrypt-localhost❩ HTTP server is listening on port 80.
 🚀 🎉 Server running at https://192.168.1.3

TODO

  • 尝试让图片动起来~

感谢

百度飞桨官方

#人脸检测
hub install pyramidbox_lite_server_mask==1.3.1
#人像分割模型
hub install humanseg_server==1.2.1

ar-cutpaste提供的灵感

ar-lab's People

Contributors

shadowcz007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ar-lab's Issues

我的server运行一直卡在这里

INFO: pip is looking at multiple versions of websockets to determine which version is compatible with other requirements. This could take a while.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: pip is looking at multiple versions of uvloop to determine which version is compatible with other requirements. This could take a while.

复制到微信无法成功

请问复制到微信是需要什么特殊的步骤吗?还是摄像头需要对准什么位置?我好像只能复制粘贴到桌面。谢谢。

手机浏览器输入网址后没有反应

按照教程分别启动serverclient后得到了一个内网地址,然后在手机浏览器上输入了该地址,手机屏幕只出现了It works的字样,其余没有任何反应。请问这个应该怎么解决呢?

client报错

npm ERR! code 1
npm ERR! path D:\AR-lab-main\client\node_modules\lzma-native
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.7.0 found at "C:\Users\xktao\Anaconda3\python.exe"
npm ERR! gyp info find VS using VS2019 (16.7.30621.155) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! (node:9188) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will
be read-only.
npm ERR! (Use node --trace-deprecation ... to show where the warning was created)
npm ERR! gyp info spawn C:\Users\xktao\Anaconda3\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'D:\AR-lab-main\client\node_modules\node-gyp\gyp\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'D:\AR-lab-main\client\node_modules\lzma-native\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'D:\AR-lab-main\client\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\xktao\AppData\Local\node-gyp\Cache\16.14.2\include\node\common.gypi',

npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\xktao\AppData\Local\node-gyp\Cache\16.14.2',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=D:\AR-lab-main\client\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\xktao\\AppData\\Local\\node-gyp\\Cache\\16.14.2
\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=D:\AR-lab-main\client\node_modules\lzma-native',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'D:\AR-lab-main\client\node_modules\lzma-native\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp: Undefined variable module_path in binding.gyp while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (D:\AR-lab-main\client\node_modules\node-gyp\lib\configure.js:351:1
6)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.19044
npm ERR! gyp ERR! command "E:\Program Files (x86)\node.exe" "D:\AR-lab-main\client\node_modules\node-gyp\bin\nod
e-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd D:\AR-lab-main\client\node_modules\lzma-native
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\xktao\AppData\Local\npm-cache_logs\2022-04-21T06_53_59_491Z-debug-0.log

报错了

(node:2849) UnhandledPromiseRejectionWarning: FetchError: request to http://0.0.0.0:8891/segment failed, reason: connect ECONNREFUSED 0.0.0.0:8891
at ClientRequest. (/Users/xgf/code/AR-lab/client/node_modules/node-fetch/lib/index.js:1461:11)
at ClientRequest.emit (events.js:315:20)
at Socket.socketErrorListener (_http_client.js:469:9)
at Socket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
(node:2849) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.