GeneFacePlusPlus icon indicating copy to clipboard operation
GeneFacePlusPlus copied to clipboard

Cannot train,have issues of cuda problems

Open zhuyang2356 opened this issue 1 year ago • 0 comments

image the problems are above. My Torch Version is 2.0.1, Cuda Version is 11.8: My commands are as follows, #--------------Prepare the Environment source /root/miniconda3/bin/activate conda create -n geneface python=3.9 conda activate geneface conda install conda-forge::ffmpeg # ffmpeg with libx264 codec to turn images to video conda install pytorch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2 pytorch-cuda=11.8 -c pytorch -c nvidia

pip install "git+https://github.com/facebookresearch/pytorch3d.git@stable" pip install cython pip install openmim==0.3.9 mim install mmcv==2.1.0

apt-get update sudo apt-get install libasound2-dev portaudio19-dev

cd GeneFacePlusPlus/ pip install -r docs/prepare_env/requirements.txt -v bash docs/prepare_env/install_ext.sh

export CUDA_VISIBLE_DEVICES=0 export VIDEO_ID=s1 echo $VIDEO_ID

#-----------------------------Prepare Data #Step0. Crop videos to 512 * 512 and 25 FPS, ensure there is face in every frame. ffmpeg -i data/raw/videos/${VIDEO_ID}.mp4 -vf fps=25,scale=w=512:h=512 -qmin 1 -q:v 1 data/raw/videos/${VIDEO_ID}_512.mp4 mv data/raw/videos/${VIDEO_ID}.mp4 data/raw/videos/${VIDEO_ID}_to_rm.mp4 mv data/raw/videos/${VIDEO_ID}_512.mp4 data/raw/videos/${VIDEO_ID}.mp4

#step1: Extract audio features, such as mel, f0, hubuert and esperanto export CUDA_VISIBLE_DEVICES=0 export PYTHONPATH=./ mkdir -p data/processed/videos/${VIDEO_ID} ffmpeg -i data/raw/videos/${VIDEO_ID}.mp4 -f wav -ar 16000 data/processed/videos/${VIDEO_ID}/aud.wav python data_gen/utils/process_audio/extract_hubert.py --video_id=${VIDEO_ID} python data_gen/utils/process_audio/extract_mel_f0.py --video_id=${VIDEO_ID}

#Step2. Extract images mkdir -p data/processed/videos/${VIDEO_ID}/gt_imgs ffmpeg -i data/raw/videos/${VIDEO_ID}.mp4 -vf fps=25,scale=w=512:h=512 -qmin 1 -q:v 1 -start_number 0 data/processed/videos/${VIDEO_ID}/gt_imgs/%08d.jpg python data_gen/utils/process_video/extract_segment_imgs.py --ds_name=nerf --vid_dir=data/raw/videos/${VIDEO_ID}.mp4 --force_single_process # extract image, segmap, and background #Step3. Extract lm2d_mediapipe python data_gen/utils/process_video/extract_lm2d.py --ds_name=nerf --vid_dir=data/raw/videos/${VIDEO_ID}.mp4

Step3. Fit 3DMM python data_gen/utils/process_video/fit_3dmm_landmark.py --ds_name=nerf --vid_dir=data/raw/videos/${VIDEO_ID}.mp4 --reset --debug --id_mode=global Step4. Binarize python data_gen/runs/binarizer_nerf.py --video_id=${VIDEO_ID}

#---------------------train_data python tasks/run.py --config=egs/datasets/${VIDEO_ID}/lm3d_radnerf_sr.yaml --exp_name=motion2video_nerf/may_head --reset

zhuyang2356 avatar Feb 28 '24 09:02 zhuyang2356