当前位置: 首页 > news >正文

finedance 测试笔记

目录

网络创新点

引入了一个细粒度的舞蹈数据集

依赖库:

预测流程:

音乐wav切割120帧

general_all.py改进

模型EDGE

数据格式 smplx 学习笔记:


网络创新点

引入了一个细粒度的舞蹈数据集

我们引入了一个细粒度的舞蹈数据集(FineDance)。它包括从 346 对歌曲和舞蹈中收集的超过 14.6 小时的数据,由专业舞者和动作捕捉系统创建,该系统具有准确的身体和手部动作

依赖库:

import pickle5 as pickle

pypi尚pickle5最高python版本3.7:

pickle5 · PyPI

解决方法,改为

import pickle

预测流程:

Data preprocessing
python data/code/pre_motion.py

处理运动数据 npy转npy

音乐wav切割120帧

data/code/pre_music.py


Training
accelerate launch train_seq.py
Generate
python data/code/slice_music_motion.py
python generate_all.py  --motion_save_dir generated/finedance_seq_120_dancer --save_motions
Generate dance by custom music
python test.py --music_dir 'your music dir' --save_motions
Visualization
python render.py --modir eval/motions --gpu 0

general_all.py改进

import glob
import os,sys
from functools import cmp_to_key
from pathlib import Path# import jukemirlib
import numpy as np
import torch
from tqdm import tqdmfrom args import FineDance_parse_test_opt
from train_seq import EDGE
from dataset.FineDance_dataset import get_train_test_list# test_list = ["063", "132", "143", "036", "098", "198", "130", "012", "211", "193", "179", "065", "137", "161", "092", "120", "037", "109", "204", "144"]def test(opt):# split = get_train_test_dict(opt.datasplit)train_list, test_list, ignore_list = get_train_test_list(opt.datasplit)for file in os.listdir(music_dir):if file[:3] in ignore_list:continueif not file[:3] in test_list:continuefile_name = file[:-4]music_fea = np.load(os.path.join(music_dir, file))music_fea = torch.from_numpy(music_fea).cuda().unsqueeze(0)music_fea = music_fea.repeat(count, 1, 1)all_filenames = [file_name]*count# directory for optionally saving the dances for evalfk_out = Noneif opt.save_motions:fk_out = opt.motion_save_diros.makedirs(fk_out,exist_ok=True)model = EDGE(opt, opt.feature_type, opt.checkpoint)model.eval()data_tuple = None, music_fea, all_filenamesmodel.render_sample(data_tuple, "test", opt.render_dir, render_count=10, mode='normal', fk_out=fk_out, render=not opt.no_render)print("Done")if __name__ == "__main__":test_list = ["063", "144"]data_dir=r'E:\迅雷下载/'music_dir = data_dir+"data/finedance/div_by_time/music_npy_120"count = 10opt = FineDance_parse_test_opt()test(opt)# python test.py --save_motions

模型EDGE

模型原来输入长度是120,改为240后,预训练不能用了。

        model = SeqModel(nfeats=repr_dim,seq_len=horizon,latent_dim=512,ff_size=1024,num_layers=8,num_heads=8,dropout=0.1,cond_feature_dim=feature_dim,activation=F.gelu,)if opt.nfeats == 139 or opt.nfeats == 135:smplx_fk = SMPLSkeleton(device=self.accelerator.device)else:smplx_fk = SMPLX_Skeleton(device=self.accelerator.device, batch=512000)diffusion = GaussianDiffusion(model,opt,horizon,repr_dim,smplx_model = smplx_fk,schedule="cosine",n_timestep=1000,predict_epsilon=False,loss_type="l2",use_p2=False,cond_drop_prob=0.25,guidance_weight=2,do_normalize = opt.do_normalize)print("Model has {} parameters".format(sum(y.numel() for y in model.parameters())))self.model = self.accelerator.prepare(model)    

数据格式 smplx 学习笔记:

SMPL学习笔记_smplx 如何描述人体-CSDN博客

相关文章:

  • 鸿蒙Harmony应用开发—ArkTS声明式开发(通用属性:Popup控制)
  • RK3568 Android12 适配抖音 各大APP
  • 备战蓝桥杯---状态压缩DP进阶题1
  • qsort使用
  • 数据库-第二/三章 关系数据库和标准语言SQL【期末复习|考研复习】
  • Springboot+vue的商业辅助决策系统的设计与实现(有报告)。Javaee项目,springboot vue前后端分离项目
  • 微信小程序自制动态导航栏
  • GNER: 生成式实体识别的新 SoTA
  • 数据结构实现-线性表
  • Javaweb之SpringBootWeb案例之自动配置的原理分析的详细解析
  • Flink基本原理 + WebUI说明 + 常见问题分析
  • element-plus表格合并
  • C 基本语法
  • C#双向链表实现:Append()方法追加并显示数据
  • 【k8s管理--两种方式安装prometheus】
  • [原]深入对比数据科学工具箱:Python和R 非结构化数据的结构化
  • 【腾讯Bugly干货分享】从0到1打造直播 App
  • Docker: 容器互访的三种方式
  • LeetCode29.两数相除 JavaScript
  • MySQL-事务管理(基础)
  • OpenStack安装流程(juno版)- 添加网络服务(neutron)- controller节点
  • PHP那些事儿
  • RxJS: 简单入门
  • SpiderData 2019年2月25日 DApp数据排行榜
  • 深入浅出Node.js
  • 跳前端坑前,先看看这个!!
  • #if和#ifdef区别
  • #Js篇:单线程模式同步任务异步任务任务队列事件循环setTimeout() setInterval()
  • (02)Hive SQL编译成MapReduce任务的过程
  • (04)odoo视图操作
  • (2022版)一套教程搞定k8s安装到实战 | RBAC
  • (附源码)springboot宠物管理系统 毕业设计 121654
  • (附源码)springboot太原学院贫困生申请管理系统 毕业设计 101517
  • (求助)用傲游上csdn博客时标签栏和网址栏一直显示袁萌 的头像
  • (十六)串口UART
  • (转)http-server应用
  • **CI中自动类加载的用法总结
  • .a文件和.so文件
  • .Net - 类的介绍
  • .Net CF下精确的计时器
  • .NET Core使用NPOI导出复杂,美观的Excel详解
  • .Net MVC + EF搭建学生管理系统
  • .Net面试题4
  • .NET命令行(CLI)常用命令
  • /deep/和 >>>以及 ::v-deep 三者的区别
  • @Query中countQuery的介绍
  • [20150321]索引空块的问题.txt
  • [ABP实战开源项目]---ABP实时服务-通知系统.发布模式
  • [C/C++]数据结构 堆的详解
  • [error] 17755#0: *58522 readv() failed (104: Connection reset by peer) while reading upstream
  • [HCIE] IPSec-VPN (手工模式)
  • [HTML]Web前端开发技术28(HTML5、CSS3、JavaScript )JavaScript基础——喵喵画网页
  • [iOS]-UIKit
  • [JavaScript]_[初级]_[不使用JQuery原生Ajax提交表单文件并监听进度]
  • [MySQL]基础的增删改查