Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
27号BigBang
labelme
提交
0bce275b
L
labelme
项目概览
27号BigBang
/
labelme
与 Fork 源项目一致
从无法访问的项目Fork
通知
6
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
labelme
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0bce275b
编写于
8月 28, 2019
作者:
K
Kentaro Wada
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Travis CI -> GitHub Actions
上级
7d17a19f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
149 addition
and
140 deletion
+149
-140
.github/workflows/main.yml
.github/workflows/main.yml
+149
-0
.travis.yml
.travis.yml
+0
-140
未找到文件。
.github/workflows/main.yml
0 → 100644
浏览文件 @
0bce275b
name
:
CI
on
:
[
push
]
jobs
:
build
:
runs-on
:
${{ matrix.os }}
strategy
:
matrix
:
os
:
[
macOS-latest
,
ubuntu-latest
]
PYTEST_QT_API
:
[
pyqt5
,
pyqt4v2
,
pyside2
]
PYTHON_VERSION
:
[
'
2.7'
,
'
3.6'
]
exclude
:
-
os
:
macOS-latest
PYTEST_QT_API
:
pyqt4v2
-
os
:
macOS-latest
PYTEST_QT_API
:
pyside2
-
PYTHON_VERSION
:
'
3.6'
PYTEST_QT_API
:
pyqt4v2
steps
:
-
uses
:
actions/checkout@v1
-
name
:
Update submodules
run
:
|
git submodule update --init --recursive
-
name
:
Install system dependencies
run
:
|
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
sudo apt-get install -y coreutils
sudo apt-get install -y xvfb herbstluftwm
else
brew install coreutils
brew cask install xquartz
fi
-
name
:
Set up Miniconda
run
:
|
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
curl -L -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
else
curl -L -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
fi
bash miniconda.sh -b -p $HOME/miniconda
rm -f miniconda.sh
export PATH="$HOME/miniconda/bin:$PATH"
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
-
name
:
Set up Python
env
:
PYTHON_VERSION
:
${{ matrix.PYTHON_VERSION }}
run
:
|
export PATH="$HOME/miniconda/bin:$PATH"
conda install -y python=$PYTHON_VERSION
which python
python --version
pip --version
-
name
:
Install dependencies
run
:
|
export PATH="$HOME/miniconda/bin:$PATH"
if [ "${{ matrix.PYTEST_QT_API }}" = "pyside2" ]; then
if [ "${{ matrix.PYTHON_VERSION }}" = "2.7" ]; then
conda install -y 'pyside2!=5.12.4' -c conda-forge
else
conda install -y pyside2 -c conda-forge
fi
elif [ "${{ matrix.PYTEST_QT_API }}" = "pyqt4v2" ]; then
conda install -y pyqt=4 -c conda-forge
else # pyqt5
conda install -y pyqt=5
fi
conda install -y help2man
pip install flake8 pytest pytest-qt
-
name
:
Install main
run
:
|
export PATH="$HOME/miniconda/bin:$PATH"
pip install .
-
name
:
Lint with flake8
run
:
|
export PATH="$HOME/miniconda/bin:$PATH"
flake8 .
-
name
:
Test with pytest
env
:
PYTEST_QT_API
:
${{ matrix.PYTEST_QT_API }}
run
:
|
# open virtual display
if [ "${{ matrix.os }}" = "ubuntu-latest" ]; then
export DISPLAY=:99.0
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX +render -noreset
(herbstluftwm )&
else
(sudo Xvfb :99 -ac -screen 0 1024x768x8 )&
fi
# run test
export PATH="$HOME/miniconda/bin:$PATH"
MPLBACKEND='agg' pytest tests -m 'not gpu'
-
name
:
Run examples
env
:
MPLBACKEND
:
agg
run
:
|
export PATH="$HOME/miniconda/bin:$PATH"
labelme --help
labelme --version
(cd examples/primitives && labelme_json_to_dataset primitives.json && rm -rf primitives_json)
(cd examples/tutorial && rm -rf apc2016_obj3_json && labelme_json_to_dataset apc2016_obj3.json && python load_label_png.py && git checkout -- .)
(cd examples/semantic_segmentation && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
(cd examples/instance_segmentation && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
(cd examples/video_annotation && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
pip install lxml # for bbox_detection/labelme2voc.py
(cd examples/bbox_detection && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
pip install cython && pip install pycocotools # for instance_segmentation/labelme2coco.py
(cd examples/instance_segmentation && rm -rf data_dataset_coco && ./labelme2coco.py data_annotated data_dataset_coco --labels labels.txt && git checkout -- .)
-
name
:
Run pyinstaller
run
:
|
if [ "${{ matrix.PYTEST_QT_API }}" = "pyqt5" -a "${{ matrix.PYTHON_VERSION }}" = "3.6" ]; then
export PATH="$HOME/miniconda/bin:$PATH"
# # Cleanup
# pip uninstall -y $PIP_DEPENDENCIES
# # https://github.com/wkentaro/labelme/issues/183
# if [ $TRAVIS_OS_NAME = "osx" ]; then
# pip uninstall -y Pillow
# conda install -y Pillow
# fi
# Build the standalone executable
pip install 'pyinstaller!=3.4' # 3.4 raises error
# # numpy 1.17 raises error
# # See https://github.com/wkentaro/labelme/issues/465
# pip install 'numpy<1.17'
pyinstaller labelme.spec
dist/labelme --version
fi
.travis.yml
已删除
100644 → 0
浏览文件 @
7d17a19f
language
:
generic
cache
:
-
pip
sudo
:
required
dist
:
trusty
branches
:
only
:
-
master
-
/v\d+\.\d+.\d+/
notifications
:
email
:
false
env
:
global
:
# used by ci-helpers
-
SETUP_XVFB=true
-
PIP_DEPENDENCIES='hacking pytest pytest-qt'
-
MPLBACKEND=TkAgg
# for osx
matrix
:
include
:
-
os
:
osx
env
:
-
PYTEST_QT_API=pyqt5
-
PYQT_PACKAGE='pyqt=5'
-
PYTHON_VERSION=3.6
-
RUN_PYINSTALLER=true
-
os
:
linux
dist
:
trusty
env
:
-
PYTEST_QT_API=pyqt4v2
-
PYQT_PACKAGE='pyqt=4'
-
PYTHON_VERSION=2.7
-
os
:
linux
dist
:
trusty
env
:
-
PYTEST_QT_API=pyside2
-
CONDA_CHANNELS='conda-forge'
-
PYQT_PACKAGE='pyside2!=5.12.4'
-
PYTHON_VERSION=2.7
-
os
:
linux
dist
:
trusty
env
:
-
PYTEST_QT_API=pyside2
-
CONDA_CHANNELS='conda-forge'
-
PYQT_PACKAGE='pyside2'
-
PYTHON_VERSION=3.6
-
os
:
linux
dist
:
trusty
env
:
-
PYTEST_QT_API=pyqt5
-
PYQT_PACKAGE='pyqt=5'
-
PYTHON_VERSION=2.7
-
os
:
linux
dist
:
trusty
env
:
-
PYTEST_QT_API=pyqt5
-
PYQT_PACKAGE='pyqt=5'
-
PYTHON_VERSION=3.6
-
RUN_PYINSTALLER=true
install
:
# Setup X
-
|
if [ $TRAVIS_OS_NAME = "linux" ]; then
sudo apt-get update
# Xvfb / window manager
sudo apt-get install -y xvfb herbstluftwm
elif [ $TRAVIS_OS_NAME = "osx" ]; then
brew cask install xquartz
fi
# Setup miniconda
-
git clone --depth 1 git://github.com/astropy/ci-helpers.git
-
CONDA_DEPENDENCIES=$PYQT_PACKAGE source ci-helpers/travis/setup_conda.sh
-
source activate test && export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH
-
pip install .
-
rm -rf ci-helpers miniconda.sh
before_script
:
-
if [ $TRAVIS_OS_NAME = "linux" ]; then (herbstluftwm )& fi
-
if [ $TRAVIS_OS_NAME = "osx" ]; then (sudo Xvfb :99 -ac -screen 0 1024x768x8 )& fi
-
sleep
1
script
:
# Run flake8
-
flake8 examples labelme setup.py tests
# Run help2man
-
conda install -y help2man
# Run pytest
-
pytest -v tests
-
labelme --help
-
labelme --version
# Run examples
-
(cd examples/primitives && labelme_json_to_dataset primitives.json && rm -rf primitives_json)
-
(cd examples/tutorial && rm -rf apc2016_obj3_json && labelme_json_to_dataset apc2016_obj3.json && python load_label_png.py && git checkout -- .)
-
(cd examples/semantic_segmentation && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
-
(cd examples/instance_segmentation && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
-
(cd examples/video_annotation && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
-
pip install lxml
# for bbox_detection/labelme2voc.py
-
(cd examples/bbox_detection && rm -rf data_dataset_voc && ./labelme2voc.py data_annotated data_dataset_voc --labels labels.txt && git checkout -- .)
-
pip install cython && pip install pycocotools
# for instance_segmentation/labelme2coco.py
-
(cd examples/instance_segmentation && rm -rf data_dataset_coco && ./labelme2coco.py data_annotated data_dataset_coco --labels labels.txt && git checkout -- .)
# Run pyinstaller
-
|
if [ "$RUN_PYINSTALLER" = "true" ]; then
# Cleanup
pip uninstall -y $PIP_DEPENDENCIES
# https://github.com/wkentaro/labelme/issues/183
if [ $TRAVIS_OS_NAME = "osx" ]; then
pip uninstall -y Pillow
conda install -y Pillow
fi
# Build the standalone executable
pip install 'pyinstaller!=3.4' # 3.4 raises error
# numpy 1.17 raises error
# See https://github.com/wkentaro/labelme/issues/465
pip install 'numpy<1.17'
pyinstaller labelme.spec
dist/labelme --version
fi
after_script
:
-
true
# noop
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录