update
This commit is contained in:
parent
fc6fce15c3
commit
ec56d37c03
23
README.md
23
README.md
@ -94,24 +94,25 @@
|
||||
5. 点击"确定"保存
|
||||
- 重启终端使PATH生效
|
||||
|
||||
5. **安装 micromamba**
|
||||
- 从 https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html 下载
|
||||
5. **安装 7-Zip**
|
||||
- 从 https://7-zip.org/ 下载并安装
|
||||
- 使用默认安装路径安装:
|
||||
* 64位系统: C:\Program Files\7-Zip
|
||||
* 32位系统: C:\Program Files (x86)\7-Zip
|
||||
- 脚本会自动检测这些路径
|
||||
|
||||
6. **下载预训练模型和资源**
|
||||
```cmd
|
||||
# 在PowerShell中运行:
|
||||
# 脚本会自动安装gdown并下载所需资源
|
||||
.\download_resource.bat
|
||||
```
|
||||
这将下载并解压以下资源到resource目录:
|
||||
```
|
||||
resource/
|
||||
├── NeuralHaircut/ # Neural Haircut预训练模型
|
||||
├── Matte-Anything/ # SAM和GroundingDINO模型
|
||||
├── openpose/ # OpenPose模型
|
||||
└── hyperIQA/ # 图像质量评估模型
|
||||
```
|
||||
注意:
|
||||
- 下载过程可能需要几分钟到几十分钟,取决于网络速度
|
||||
- 如果下载失败,可以重新运行脚本
|
||||
- 确保有稳定的网络连接
|
||||
|
||||
7. **克隆仓库并运行安装脚本**
|
||||
6. **克隆仓库并运行安装脚本**
|
||||
```cmd
|
||||
git clone https://github.com/Jeffreytsai1004/GaussianHairCut
|
||||
cd GaussianHairCut
|
||||
|
@ -1,11 +1,52 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
REM 检查gdown是否安装
|
||||
where gdown >nul 2>nul
|
||||
REM 设置当前目录
|
||||
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 (
|
||||
echo ERROR: gdown not found
|
||||
echo Please install gdown: pip install gdown
|
||||
echo ERROR: Python not found
|
||||
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
|
||||
)
|
||||
|
||||
@ -17,36 +58,55 @@ mkdir resource\Matte-Anything 2>nul
|
||||
mkdir resource\openpose\models 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 文件
|
||||
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
|
||||
gdown 1_9EOUXHayKiGH5nkrayncln3d6m1uV7f
|
||||
python -m gdown 1_9EOUXHayKiGH5nkrayncln3d6m1uV7f
|
||||
cd ..\PIXIE
|
||||
gdown 1mPcGu62YPc4MdkT8FFiOCP629xsENHZf
|
||||
tar -xf pixie_data.tar.gz
|
||||
python -m gdown 1mPcGu62YPc4MdkT8FFiOCP629xsENHZf
|
||||
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
|
||||
|
||||
REM 下载 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://github.com/IDEA-Research/GroundingDINO/releases/download/v0.1.0-alpha/groundingdino_swint_ogc.pth
|
||||
gdown 1d97oKuITCeWgai2Tf3iNilt6rMSSYzkW -O model.pth
|
||||
|
||||
REM 下载 OpenPose 模型
|
||||
cd ..\openpose
|
||||
gdown 1Yn03cKKfVOq4qXmgBMQD20UMRRRkd_tV -O models.tar.gz
|
||||
tar -xf models.tar.gz -C models
|
||||
echo Downloading OpenPose 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
|
||||
|
||||
REM 下载 hyperIQA 模型
|
||||
cd ..\hyperIQA\pretrained
|
||||
gdown 1OOUmnbvpGea0LIGpIWEbOyxfWx6UCiiE
|
||||
echo Downloading hyperIQA models...
|
||||
python -m gdown 1OOUmnbvpGea0LIGpIWEbOyxfWx6UCiiE
|
||||
|
||||
cd ..\..
|
||||
echo Download completed!
|
||||
echo.
|
||||
echo Download completed successfully!
|
||||
echo Resource files have been downloaded to the resource directory.
|
||||
echo.
|
||||
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
echo.
|
||||
echo ERROR: Download failed
|
||||
echo Please check your internet connection and try again
|
||||
exit /b 1
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user