update
This commit is contained in:
parent
fc6fce15c3
commit
ec56d37c03
23
README.md
23
README.md
@ -94,24 +94,25 @@
|
|||||||
5. 点击"确定"保存
|
5. 点击"确定"保存
|
||||||
- 重启终端使PATH生效
|
- 重启终端使PATH生效
|
||||||
|
|
||||||
5. **安装 micromamba**
|
5. **安装 7-Zip**
|
||||||
- 从 https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html 下载
|
- 从 https://7-zip.org/ 下载并安装
|
||||||
|
- 使用默认安装路径安装:
|
||||||
|
* 64位系统: C:\Program Files\7-Zip
|
||||||
|
* 32位系统: C:\Program Files (x86)\7-Zip
|
||||||
|
- 脚本会自动检测这些路径
|
||||||
|
|
||||||
6. **下载预训练模型和资源**
|
6. **下载预训练模型和资源**
|
||||||
```cmd
|
```cmd
|
||||||
# 在PowerShell中运行:
|
# 在PowerShell中运行:
|
||||||
|
# 脚本会自动安装gdown并下载所需资源
|
||||||
.\download_resource.bat
|
.\download_resource.bat
|
||||||
```
|
```
|
||||||
这将下载并解压以下资源到resource目录:
|
注意:
|
||||||
```
|
- 下载过程可能需要几分钟到几十分钟,取决于网络速度
|
||||||
resource/
|
- 如果下载失败,可以重新运行脚本
|
||||||
├── NeuralHaircut/ # Neural Haircut预训练模型
|
- 确保有稳定的网络连接
|
||||||
├── Matte-Anything/ # SAM和GroundingDINO模型
|
|
||||||
├── openpose/ # OpenPose模型
|
|
||||||
└── hyperIQA/ # 图像质量评估模型
|
|
||||||
```
|
|
||||||
|
|
||||||
7. **克隆仓库并运行安装脚本**
|
6. **克隆仓库并运行安装脚本**
|
||||||
```cmd
|
```cmd
|
||||||
git clone https://github.com/Jeffreytsai1004/GaussianHairCut
|
git clone https://github.com/Jeffreytsai1004/GaussianHairCut
|
||||||
cd GaussianHairCut
|
cd GaussianHairCut
|
||||||
|
@ -1,11 +1,52 @@
|
|||||||
@echo off
|
@echo off
|
||||||
setlocal enabledelayedexpansion
|
setlocal enabledelayedexpansion
|
||||||
|
|
||||||
REM 检查gdown是否安装
|
REM 设置当前目录
|
||||||
where gdown >nul 2>nul
|
SET PROJECT_DIR=%~dp0
|
||||||
|
cd %PROJECT_DIR%
|
||||||
|
|
||||||
|
REM 检查7-Zip安装路径
|
||||||
|
SET "SEVENZIP_PATH=C:\Program Files\7-Zip\7z.exe"
|
||||||
|
IF NOT EXIST "%SEVENZIP_PATH%" (
|
||||||
|
SET "SEVENZIP_PATH=C:\Program Files (x86)\7-Zip\7z.exe"
|
||||||
|
)
|
||||||
|
IF NOT EXIST "%SEVENZIP_PATH%" (
|
||||||
|
echo ERROR: 7-Zip not found
|
||||||
|
echo Please install 7-Zip from https://7-zip.org/
|
||||||
|
echo Default install locations checked:
|
||||||
|
echo - C:\Program Files\7-Zip\7z.exe
|
||||||
|
echo - C:\Program Files (x86)\7-Zip\7z.exe
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
REM 检查Python是否安装
|
||||||
|
python --version >nul 2>nul
|
||||||
IF %ERRORLEVEL% NEQ 0 (
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
echo ERROR: gdown not found
|
echo ERROR: Python not found
|
||||||
echo Please install gdown: pip install gdown
|
echo Please install Python and add it to PATH
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
REM 安装gdown
|
||||||
|
echo Installing gdown...
|
||||||
|
python -m pip install --user gdown --quiet
|
||||||
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
|
echo ERROR: Failed to install gdown
|
||||||
|
echo Please check your internet connection and try again
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
REM 添加Python Scripts目录到PATH
|
||||||
|
for /f "tokens=*" %%i in ('python -c "import sys; print(sys.executable)"') do set PYTHON_PATH=%%i
|
||||||
|
set PYTHON_SCRIPTS_PATH=%PYTHON_PATH:python.exe=Scripts%
|
||||||
|
set PYTHON_USER_SCRIPTS=%USERPROFILE%\AppData\Roaming\Python\Python3*\Scripts
|
||||||
|
set PATH=%PYTHON_SCRIPTS_PATH%;%PYTHON_USER_SCRIPTS%;%PATH%
|
||||||
|
|
||||||
|
REM 验证gdown是否可用
|
||||||
|
python -m gdown --version >nul 2>nul
|
||||||
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
|
echo ERROR: gdown installation found but not accessible
|
||||||
|
echo Please try reinstalling gdown: python -m pip install --user --upgrade gdown
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,36 +58,55 @@ mkdir resource\Matte-Anything 2>nul
|
|||||||
mkdir resource\openpose\models 2>nul
|
mkdir resource\openpose\models 2>nul
|
||||||
mkdir resource\hyperIQA\pretrained 2>nul
|
mkdir resource\hyperIQA\pretrained 2>nul
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Starting downloads...
|
||||||
|
echo This may take a while depending on your internet connection...
|
||||||
|
echo.
|
||||||
|
|
||||||
REM 下载 Neural Haircut 文件
|
REM 下载 Neural Haircut 文件
|
||||||
cd resource\NeuralHaircut
|
cd resource\NeuralHaircut
|
||||||
gdown --folder https://drive.google.com/drive/folders/1TCdJ0CKR3Q6LviovndOkJaKm8S1T9F_8
|
echo Downloading Neural Haircut files...
|
||||||
|
python -m gdown --folder https://drive.google.com/drive/folders/1TCdJ0CKR3Q6LviovndOkJaKm8S1T9F_8
|
||||||
cd diffusion_prior
|
cd diffusion_prior
|
||||||
gdown 1_9EOUXHayKiGH5nkrayncln3d6m1uV7f
|
python -m gdown 1_9EOUXHayKiGH5nkrayncln3d6m1uV7f
|
||||||
cd ..\PIXIE
|
cd ..\PIXIE
|
||||||
gdown 1mPcGu62YPc4MdkT8FFiOCP629xsENHZf
|
python -m gdown 1mPcGu62YPc4MdkT8FFiOCP629xsENHZf
|
||||||
tar -xf pixie_data.tar.gz
|
REM 使用7-Zip解压tar.gz文件
|
||||||
|
"%SEVENZIP_PATH%" x pixie_data.tar.gz -y
|
||||||
|
"%SEVENZIP_PATH%" x pixie_data.tar -y
|
||||||
del pixie_data.tar.gz
|
del pixie_data.tar.gz
|
||||||
|
del pixie_data.tar
|
||||||
|
|
||||||
REM 下载 Matte-Anything 文件
|
REM 下载 Matte-Anything 文件
|
||||||
cd ..\..\Matte-Anything
|
cd ..\..\Matte-Anything
|
||||||
|
echo Downloading Matte-Anything files...
|
||||||
curl -LO https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth
|
curl -LO https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth
|
||||||
curl -LO https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth
|
curl -LO https://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth
|
||||||
gdown 1d97oKuITCeWgai2Tf3iNilt6rMSSYzkW -O model.pth
|
gdown 1d97oKuITCeWgai2Tf3iNilt6rMSSYzkW -O model.pth
|
||||||
|
|
||||||
REM 下载 OpenPose 模型
|
REM 下载 OpenPose 模型
|
||||||
cd ..\openpose
|
cd ..\openpose
|
||||||
gdown 1Yn03cKKfVOq4qXmgBMQD20UMRRRkd_tV -O models.tar.gz
|
echo Downloading OpenPose models...
|
||||||
tar -xf models.tar.gz -C models
|
python -m gdown 1Yn03cKKfVOq4qXmgBMQD20UMRRRkd_tV -O models.tar.gz
|
||||||
|
"%SEVENZIP_PATH%" x models.tar.gz -y
|
||||||
|
"%SEVENZIP_PATH%" x models.tar -y -omodels
|
||||||
del models.tar.gz
|
del models.tar.gz
|
||||||
|
del models.tar
|
||||||
|
|
||||||
REM 下载 hyperIQA 模型
|
REM 下载 hyperIQA 模型
|
||||||
cd ..\hyperIQA\pretrained
|
cd ..\hyperIQA\pretrained
|
||||||
gdown 1OOUmnbvpGea0LIGpIWEbOyxfWx6UCiiE
|
echo Downloading hyperIQA models...
|
||||||
|
python -m gdown 1OOUmnbvpGea0LIGpIWEbOyxfWx6UCiiE
|
||||||
|
|
||||||
cd ..\..
|
cd ..\..
|
||||||
echo Download completed!
|
echo.
|
||||||
|
echo Download completed successfully!
|
||||||
|
echo Resource files have been downloaded to the resource directory.
|
||||||
|
echo.
|
||||||
|
|
||||||
IF %ERRORLEVEL% NEQ 0 (
|
IF %ERRORLEVEL% NEQ 0 (
|
||||||
|
echo.
|
||||||
echo ERROR: Download failed
|
echo ERROR: Download failed
|
||||||
|
echo Please check your internet connection and try again
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user