Skip to content

Commit

Permalink
Add eiseg
Browse files Browse the repository at this point in the history
  • Loading branch information
geoyee authored Jul 7, 2021
1 parent ef98e47 commit b263c62
Show file tree
Hide file tree
Showing 117 changed files with 8,281 additions and 0 deletions.
150 changes: 150 additions & 0 deletions contrib/EISeg/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
dzq*
.vscode
.vscode/
vis_temp.py
test.txt
*.pdparams
output/

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# vscode
.vscode/*

# exe
out/
eiseg/requirements_with_opt.txt

# test
test_output/
*.npy

# qsetting
*.ini
2 changes: 2 additions & 0 deletions contrib/EISeg/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include eiseg/config/*
include eiseg/resource/*
61 changes: 61 additions & 0 deletions contrib/EISeg/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[![Python 3.6](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/release/python-360/) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](LICENSE)
<!-- [![GitHub release](https://img.shields.io/github/release/Naereen/StrapDown.js.svg)](https://github.com/PaddleCV-SIG/iseg/releases) -->

# EISeg

EISeg(Efficient Interactive Segmentation)高效交互式分割标注软件

# 安装

交互式标注过程中需要用到深度学习模型推理,[模型权重文件](./doc/WEIGHT.md)目前需要单独下载。EISeg提供多种安装方式,其中使用[pip](#PIP)[conda](#conda安装)[运行代码](#运行代码)方式可兼容Windows,Mac OS和Linux。为了避免环境冲突,推荐在conda创建的虚拟环境中安装。

## PIP

最简单的安装方式是使用pip
```shell
pip install eiseg
```
pip会自动安装依赖。安装完成后命令行输入
```shell
eiseg
```
即可运行软件。

## Conda
首先安装Anaconda或Miniconda,过程参考[清华镜像教程](https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/)
```shell
conda create -n eiseg python=3.8
conda install qtpy
pip install eiseg
eiseg
```

## Windows exe

EISeg使用[QPT](https://github.com/GT-ZhangAcer/QPT)进行打包。可以从[百度云盘](https://pan.baidu.com/s/1K7cbNnlCtfEXcuiamdxjWA)(提取码:82z9)下载目前最新的EISeg,也可从[Releases](https://github.com/PaddleCV-SIG/EISeg/releases)中进行下载。解压后双击启动程序.exe即可运行程序。程序第一次运行会初始化安装所需要的包,请稍等片刻。

## 运行代码

首先clone本项目到本地。
```shell
git clone https://github.com/paddlecv-sig/eiseg
cd eiseg
pip install -r requirements.txt
python -m eiseg
```
即可开始执行。

注:软件默认安装cpu版Paddle,如需使用GPU版可以按照[Paddle官网教程](https://www.paddlepaddle.org.cn/install/quick)安装。

# 开发者
[JueYing Hao]()

[YiZhou Chen](https://github.com/geoyee)

[Lin Han](https://github.com/linhandev/)

[GT](https://github.com/GT-ZhangAcer)

[ZhiLiang Yu](https://github.com/yzl19940819)

<!-- [![Sparkline](https://stars.medv.io/Naereen/badges.svg)](https://stars.medv.io/PaddleCV-SIG/iseg) -->
5 changes: 5 additions & 0 deletions contrib/EISeg/doc/WEIGHT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 模型下载
交互式标注过程中需要进行深度学习推理,网络结构已经在软件中定义,但是模型权重并不包含在Github项目或pip包中。目前需要单独下载,未来会加入软件内自动下载功能。注意模型的权重需要和网络结构对应,否则推理过程中会出错。

# 人像分割模型
- [hrnet18_ocr48_human](https://github.com/PaddleCV-SIG/EISeg/releases/download/v0.1.2/hrnet18s_ocr48_human_f_007.pdparams)
12 changes: 12 additions & 0 deletions contrib/EISeg/eiseg/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import sys
import os.path as osp

pjpath = osp.dirname(osp.realpath(__file__))
sys.path.append(pjpath)


from run import main
from models import models


__APPNAME__ = "EISeg"
4 changes: 4 additions & 0 deletions contrib/EISeg/eiseg/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from run import main

if __name__ == "__main__":
main()
Loading

0 comments on commit b263c62

Please sign in to comment.