Skip to content

Commit

Permalink
add colab and ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxingjun778 committed Aug 14, 2023
1 parent 415e14d commit e156b1f
Show file tree
Hide file tree
Showing 3 changed files with 147 additions and 1 deletion.
133 changes: 133 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
test.py
# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
/package
/temp
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/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

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

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# 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/

.vscode
.idea

# custom
*.pkl
*.pkl.json
*.log.json
*.whl
*.tar.gz
*.swp
*.log
*.tar.gz
source.sh
tensorboard.sh
.DS_Store
replace.sh
result.png
result.jpg
result.mp4

# Pytorch
*.pth
*.pt

# ast template
ast_index_file.py
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ FaceChain is powered by [ModelScope](https://github.com/modelscope/modelscope).

![image](resources/example3.jpg)

# News
- Colab notebook is available now! You can experience FaceChain directly with our [Colab Notebook](https://colab.research.google.com/drive/1cUhnVXseqD2EJiotZk3k7GsfQK9_yJu_?usp=sharing).

# Installation

## Compatibility Verification
Expand Down Expand Up @@ -116,6 +119,9 @@ python3 app.py
**Note**: After the app service is successfully launched, go to the URL in the log, enter the "Image Customization" tab, click "Select Image to Upload", and choose at least one image with a face. Then, click "Start Training" to begin model training. After the training is completed, there will be corresponding displays in the log. Afterwards, switch to the "Image Experience" tab and click "Start Inference" to generate your own digital image.


### 4. colab notebook
Please refer to [Colab Notebook](https://colab.research.google.com/drive/1cUhnVXseqD2EJiotZk3k7GsfQK9_yJu_?usp=sharing) for details.


# Script Execution

Expand Down
9 changes: 8 additions & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ FaceChain的模型由[ModelScope](https://github.com/modelscope/modelscope)开

![image](resources/example3.jpg)

# News
- Colab notebook安装已支持,您可以直接打开链接体验FaceChain: [Colab Notebook](https://colab.research.google.com/drive/1cUhnVXseqD2EJiotZk3k7GsfQK9_yJu_?usp=sharing)

# 环境准备

## 兼容性验证
FaceChain是一个组合模型,使用了包括pytorch和tensorflow在内的机器学习框架,以下是已经验证过的主要环境依赖:
FaceChain是一个组合模型,使用了包括PyTorch和TensorFlow在内的机器学习框架,以下是已经验证过的主要环境依赖:
- python环境: py3.8, py3.10
- pytorch版本: torch2.0.0, torch2.0.1
- tensorflow版本: 2.8.0, tensorflow-cpu
Expand Down Expand Up @@ -117,6 +120,10 @@ python3 app.py
# 最后点击log中生成的URL即可访问页面。
```

### 4. colab运行
支持colab notebook安装,参考: [Colab Notebook](https://colab.research.google.com/drive/1cUhnVXseqD2EJiotZk3k7GsfQK9_yJu_?usp=sharing)



备注:app服务成功启动后,在log中访问页面URL,进入”形象定制“tab页,点击“选择图片上传”,并最少选1张包含人脸的图片;点击“开始训练”即可训练模型。训练完成后日志中会有对应展示,之后切换到“形象体验”标签页点击“开始推理”即可生成属于自己的数字形象。

Expand Down

0 comments on commit e156b1f

Please sign in to comment.