布匹缺陷检测 - Task01:比赛全流程体验(3天)

本文详细介绍了在Ubuntu16.04系统上安装Docker的步骤,包括更新软件源、添加Docker官方及阿里云仓库、安装指定版本或最新版Docker、配置用户权限以及运行Docker测试。确保用户可以顺利安装并运行Docker。

本次比赛地址:https://tianchi.aliyun.com/s/fed26b0e90c5776e6b3d61cd5912a423

关于Docker的安装:

        我使用的是Ubutun16.04系统。安装教程如下:

安装相关包

# 先更新一下软件源库信息
$ sudo apt-get update 
$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

添加软件仓库

官方仓库

# 添加 Docker 官方的 GPG 密钥(为了确认所下载软件包的合法性,需要添加软件源的 GPG 密钥)
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# 设置稳定版本的apt仓库地址
$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

阿里云仓库

$ curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

$ sudo add-apt-repository \
     "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu \
     $(lsb_release -cs) \
     stable"

安装docker

安装最新版的docker

$ sudo apt-get update
$ sudo apt-get install docker-ce # 安装最新版的docker

如果需要安装指定版本的,使用以下命令

$ apt-cache policy docker-ce # 查看可供安装的所有docker版本
$ sudo apt-get install docker-ce=17.03.1~ce-0~ubuntu # 安装指定版本的docker
``
# 检查docker是否安装成功
$ docker --version # 查看安装的docker版本

添加访问权限

这个时候运行docker的话,如果不是root用户会报错:

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.26/images/json: dial unix /var/run/docker.sock: connect: permission denied

看一下权限

$ cd /var/run
$ ll | grep docker
# 输出如下
drwx------  8 root  root    180 11月 21 16:36 docker
-rw-r--r--  1 root  root      5 11月 21 16:35 docker.pid
srw-rw----  1 root  docker    0 11月 21 16:35 docker.sock

可以看到 docker.sock 的所有者是 docker 这个组。所以我们要把当前用户添加到这个组里。

$ sudo gpasswd -a ${USER} docker

重启docker

sudo service docker restart

切换当前会话到新 group 或者重启 X 会话

newgrp - docker

*** 注意:最后一步是必须的,否则因为 groups 命令获取到的是缓存的组信息,刚添加的组信息未能生效,所以 docker images 执行时同样有错。

运行docker测试

这个时候就可以运行helloworld测试啦~

$ docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

到这里就安装完成了~

代码下载地址: https://pan.quark.cn/s/a4b39357ea24 在计算机视觉术中,数据集扮演着训练和评估模型的核心角色。Labelme作为一个广受欢迎的开源工具,能够支持用户以交互方式对图像进行标注,而COCO(Common Objects in Context)则是一种被广泛采纳的数据集标准格式,适用于包括物体检测、图像分割在内的多种任务。本文将详细阐述如何将Labelme生成的标注数据转换为COCO数据集的标准格式。 Labelme标注的图像在输出为JSON格式时,会包含以下核心内容: 1. `version`: 指明JSON文件的版本信息。 2. `flags`: 目前未定义或保持为空,预留用于未来的功能扩展。 3. `shapes`: 列表形式存储对象的形状信息,每个形状项包含`label`(对象类别名称),`points`(构成对象边缘的多边形顶点),以及`shape_type`(通常为“polygon”)。 4. `imagePath`和`imageData`: 提供原始图像的存储路径和二进制数据,便于后续图像的还原。 5. `imageHeight`和`imageWidth`: 明确标注图像的垂直和水平尺寸。 COCO数据集的标准格式中定义了三种主要的标注类型: 1. Object instances(目标实例):主要用于执行物体检测任务。 2. Object keypoints(目标上的关键点):适用于人体姿态估计相关应用。 3. Image captions(看图说话):用于生成图像的文本描述。 COCO的JSON结构中包含以下基本组成部分: 1. `images`:记录图像的基本属性,包括`height`(高度)、`...
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值