Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
Zhangchenhao dd7866deb8 | 1 year ago | |
---|---|---|
.. | ||
assets | 1 year ago | |
compressai | 1 year ago | |
compressai.egg-info | 1 year ago | |
demo | 1 year ago | |
docker | 1 year ago | |
docs | 1 year ago | |
examples | 1 year ago | |
results | 1 year ago | |
tests | 1 year ago | |
third_party/ryg_rans | 1 year ago | |
CONTRIBUTING.md | 1 year ago | |
LICENSE | 1 year ago | |
MANIFEST.in | 1 year ago | |
Makefile | 1 year ago | |
NEWS.md | 1 year ago | |
Readme.md | 1 year ago | |
mypy.ini | 1 year ago | |
pyproject.toml | 1 year ago | |
requirements.txt | 1 year ago | |
setup.py | 1 year ago |
叶华:
环境安装:
安装MindSpore 2.0.0 Nightly,注意cuda11.1,参考:https://www.mindspore.cn/install
cd /CompressAI_MindSpore
pip install -e .
二、文件结构
/CompressAIDemo/CompressAI/demo/dataset ----------- 数据集目录,分为train,test,valid。把train的数据放置train中(训练用的数据集),test数据(测试用的数据集),valid(验证用的数据集)。
/CompressAIDemo/CompressAI/demo/decoded_files ----------- 编解码文件目录,.npz和.bin结尾的文件为编码后的码流,重构图像为png格式,和原图像名称相同
/CompressAIDemo/CompressAI/demo/model ----------- 存放模型的目录,checkpoint_best_loss.pth为最佳模型,checkpoint.pth为当前epoch的模型
/CompressAIDemo/CompressAI/demo/model_baseline.py ----------- 基础模型,包含网络框架
/CompressAIDemo/CompressAI/demo/test.py ----------- 含实际编解码过程的测试(速度较慢)
/CompressAIDemo/CompressAI/demo/test_fast.py ----------- 不含实际编解码过程的测试(速度快,但bpp不是完全准确的)
/CompressAIDemo/CompressAI/demo/train.py ----------- 网络训练文件
三、训练与测试
train,test代码中的save_path等地址按照自己的实际地址来改
命令
cd /gpfs/userhome/zhm/CompressAIDemo/CompressAI/demo/
python model_baseline.py (出现ok!没有报错说明模型设计没有问题)
python train.py -d "/gpfs/userhome/zhm/CompressAIDemo/CompressAI/demo/dataset/" --seed 0 --cuda 0 --batch-size 16 --test-batch-size 1 --save --lambda 0.01 (训练)
python test.py -d "/userhome/CompressAI/demo/dataset/" --seed 0 --cuda 0 --batch-size 16 --test-batch-size 1 --lambda 0.01 (测试)
python test_fast.py -d "/gpfs/userhome/zhm/CompressAIDemo/CompressAI/demo/dataset/" --seed 0 --cuda 0 --batch-size 16 --test-batch-size 1 --lambda 0.01 (快速测试)
No Description
Jupyter Notebook Python Text C++ reStructuredText other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》