1. 安装label-studio
由于服务器的默认python3版本太低,尝试了很多方法,没有升级。因此采用annaconda方式安装label-studio.
a.安装anaconda:
参照如下链接,安装anaconda。
Ubuntu安装Anaconda详细步骤(Ubuntu22.04.1,Anaconda3-2023.03)_ubuntu anaconda_萝北村的枫子的博客-CSDN博客
b.利用anaconda安装label-studio
conda create -n label-studio python=3.10
conda activate label-studio
pip install label-studio
c. 设置anaconda源
pip install * 时发现下载很耗时,选用国内源
pip install label-studio -i https://pypi.mirrors.ustc.edu.cn/simple/
非常有用,速度快了好多,再也不用花好几分钟等待下载一个安装包。
conda配置国内镜像源_conda国内镜像源_汪小敏同学的博客-CSDN博客

2. 设置label-studio
目标:需要将label-studio的端口修改下;需要多人访问,将网址设为比较好记的domain

该语句测试生效

该语句用--host参数设置未生效。
如何上传图片视频等数据
label-studio支持在通过网址访问数据。因此可以在数据所在的服务器上起一个http-server,在json文件中,将图片地址设为网址,即可访问数据。

选用第一种方法,在数据所在的电脑起一个httpserver。
在windows机器上的操作如下:

到要标注数据所在的目录,运行http-server -p 3000 --cors
然后在本地的浏览器上访问http://localhost:3000即可看到标注目录下的数据,在json文件中通过html即可访问图片。

通过import json 文件,即可成功导入所需标注的图片。
注意:不支持图片使用中文名称。只要图片在上传的时候http-server打开即可。数据上传后关掉http-server不影响标注图片在label-studio的显示。