当前位置: 首页 > news >正文

excel表如何做网站连接图文设计与制作

excel表如何做网站连接,图文设计与制作,wordpress 随机语句,黄页引流推广链接Linux环境下服务部署 1.使用虚拟环境[810ms]1.1 环境部署1.2 服务启动 2.使用Docker[680ms] 1.使用虚拟环境[810ms] 1.1 环境部署 Anaconda的安装步骤这里不再介绍#xff0c;直接开始使用。 # 1.创建虚拟环境 conda create -n deepface python3.9.18# 2.激活虚拟环境 cond… Linux环境下服务部署 1.使用虚拟环境[810ms]1.1 环境部署1.2 服务启动 2.使用Docker[680ms] 1.使用虚拟环境[810ms] 1.1 环境部署 Anaconda的安装步骤这里不再介绍直接开始使用。 # 1.创建虚拟环境 conda create -n deepface python3.9.18# 2.激活虚拟环境 conda activate deepface# 3.安装deepface pip install deepface -i https://pypi.tuna.tsinghua.edu.cn/simple以下操作在虚拟环境deepface下执行 # 1.安装mesa-libGL.x86_64 yum install mesa-libGL.x86_64 # 防止报错 ImportError: libGL.so.1: cannot open shared object file: No such file or directory# 2.安装deprecated pip install deprecated1.2.13 # 防止报错 ModuleNotFoundError: No module named deprecated使用yum install mesa-libGL.x86_64命令会在Linux系统中安装mesa-libGL包。这个包包含了Mesa 3D图形库的运行时库和DRI驱动。安装mesa-libGL包后系统将能够支持OpenGL这是一种用于渲染2D和3D矢量图形的跨语言、跨平台的应用程序编程接口API。 1.2 服务启动 DeepFace serves an API as well. You can clone [/api](https://github.com/serengil/deepface/tree/master/api) folder and run the api via gunicorn server. This will get a rest service up. In this way, you can call deepface from an external system such as mobile app or web. cd scripts ./service.shLinux系统使用这个命令是前台启动实际的启动用的是shell脚本内容如下 #!/bin/bash nohup python -u ./api/api.py ./deepfacelog.out 21 Face recognition, facial attribute analysis and vector representation functions are covered in the API. You are expected to call these functions as http post methods. Default service endpoints will be http://localhost:5000/verify for face recognition, http://localhost:detector_backend for facial attribute analysis, and http://localhost:5000/represent for vector representation. You can pass input images as exact image paths on your environment, base64 encoded strings or images on web. Here, you can find a postman project to find out how these methods should be called. 这里仅贴出如何传递base64进行接口调用 {img_path: data:image/,image_base64_str }仅看一下base64相关源码 def load_image(img):# The image is a base64 stringif img.startswith(data:image/):return loadBase64Img(img)def loadBase64Img(uri):encoded_data uri.split(,)[1]nparr np.fromstring(base64.b64decode(encoded_data), np.uint8)img cv2.imdecode(nparr, cv2.IMREAD_COLOR)return img2.使用Docker[680ms] You can deploy the deepface api on a kubernetes cluster with docker. The following shell script will serve deepface on localhost:5000. You need to re-configure the Dockerfile if you want to change the port. Then, even if you do not have a development environment, you will be able to consume deepface services such as verify and analyze. You can also access the inside of the docker image to run deepface related commands. Please follow the instructions in the shell script. 修改Dockerfile调整镜像库 # base image FROM python:3.8 LABEL org.opencontainers.image.source https://github.com/serengil/deepface # ----------------------------------- # create required folder RUN mkdir /app RUN mkdir /app/deepface # ----------------------------------- # Copy required files from repo into image COPY ./deepface /app/deepface COPY ./api/app.py /app/ COPY ./api/routes.py /app/ COPY ./api/service.py /app/ COPY ./requirements.txt /app/ COPY ./setup.py /app/ COPY ./README.md /app/ # ----------------------------------- # switch to application directory WORKDIR /app # ----------------------------------- # update image os RUN apt-get update RUN apt-get install ffmpeg libsm6 libxext6 -y # ----------------------------------- # if you will use gpu, then you should install tensorflow-gpu package # RUN pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-hostfiles.pythonhosted.org tensorflow-gpu # ----------------------------------- # install deepface from pypi release (might be out-of-the-date) RUN pip install deepface -i https://pypi.tuna.tsinghua.edu.cn/simple # ----------------------------------- # environment variables ENV PYTHONUNBUFFERED1 # ----------------------------------- # run the app (re-configure port if necessary) EXPOSE 5000 CMD [gunicorn, --workers1, --timeout3600, --bind0.0.0.0:5000, app:create_app()] 官网启动命令: cd scripts ./dockerize.sh报错 unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/deepface/scripts/Dockerfile: no such file or directory Unable to find image deepface:latest locally docker: Error response from daemon: pull access denied for deepface, repository does not exist or may require docker login: denied: requested access to the resource is denied. See docker run --help.解决【不要 cd scripts】原因是执行脚本的文件夹要跟构建镜像使用的Dockerfile同级 ./scripts/dockerize.sh # 这个过程一共有两个步骤1是构建镜像2是启动容器。构建镜像的速度取决于网速【时间可能会比较久】分解步骤 # 构建镜像 docker build -t deepface_image .# 创建模型文件夹【并将下载好的模型文件上传】 mkdir -p /root/.deepface/weights/# 启动容器 docker run --name deepface --privilegedtrue --restartalways --nethost -v /root/.deepface/weights/:/root/.deepface/weights/ -d deepface_image
http://www.w-s-a.com/news/843356/

相关文章:

  • 烟台理工学校网站罗湖建设网站
  • 卑鄙的网站开发公司郑州人才网站
  • 成都专业的网站设计公司文化建设的成就
  • 做书籍封皮的网站如何建网站教程视频
  • 唐山建站公司模板ipfs做网站
  • 贵阳做网站品牌网站模板
  • 紫网站建设我的个人博客
  • 优秀网站菜单网页上的视频怎么下载
  • 龙口建网站公司价格国内的平面设计网站
  • 电子商务网站建设与管理读后感上海市基础工程公司
  • 织梦免费企业网站做网站时,404网页如何指向
  • 摄影工作室网站源码百度为什么会k网站
  • 哪个网站有淘宝做图的素材网站分享做描点链接
  • 做哪个网站零售最好网站空间在哪里
  • 荆州网站建设多少钱南阳做网站推广
  • 网站代理打开个人网站设计源码
  • 做php网站的话要学什么语言wordpress搜索不到
  • 金华官方网站建设网络营销策划模板
  • 网站开发到上线在线生成小程序
  • 动易网站设计方案郑州营销网站建设
  • 怎么上网站做简易注销的步骤郑州大学现代远程教育《网页设计与网站建设》课程考核要求
  • 新乡网站建设新乡长沙本地论坛有哪些
  • 潍坊中企动力做的网站怎么样wordpress接入微博
  • 网站开发者所有权归属网站项目建设的必要性
  • 菜鸟网站编程广州网站设计权威乐云践新
  • 网站做接口到app 价格大地资源免费视频观看
  • 怎么给钓鱼网站做防红网站建设相关的
  • 教育培训的网站建设湖南网站建设小公司
  • 福建南平网站建设创意交易平台网
  • 做直播网站要哪些技术内容营销理论