FLHonker / QtPoseImitate

使用Qt实现的基于openpose和pix2pix对抗网络的游戏人物动作模拟。本科毕业设计。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

基于对抗网络的游戏人物动作模仿与实现

@author: Frank Liu
@time: 2019.1.18 - 2019.5.31
@project: 武汉理工大学本科毕业设计

使用Qt实现的基于openpose和pix2pix对抗网络的游戏人物动作模拟。本科毕业设计。

Requirements

  • Linux(Ubuntu18.04)
  • CPU - for test NVIDIA GPU(12GB) + CUDA CuDNN7.4 - for train
  • Python >= 3.4
  • PyTorch >= 1.0.0
  • python-opencv >= 3.4.0
  • Keras
  • Qt 5.12

Architecture

QtPoseImitate
├── aboutdialog.cpp
├── aboutdialog.h
├── aboutdialog.ui
├── getModels.sh
├── images
│   ├── mv_450x420.avi
│   ├── pbug3_450x420.avi
│   ├── pbug_man_450x420.avi
│   └── pose_128px.ico
├── images.qrc
├── main.cpp
├── mainwindow.cpp
├── mainwindow.h
├── mainwindow.ui
├── pytorch_pix2pix
│   ├── checkpoints
│   │   └── pbug_pix2pix
│   │       ├── latest_net_D.pth
│   │       ├── latest_net_G.pth
│   │       ├── model_version.txt
│   │       ├── v3.0_120_net_D.pth
│   │       └── v3.0_120_net_G.pth
│   ├── data
│   │   ├── aligned_dataset.py
│   │   ├── base_data_loader.py
│   │   ├── base_dataset.py
│   │   ├── image_dataset.py
│   │   ├── image_folder.py
│   │   ├── __init__.py
│   │   └── unaligned_dataset.py
│   ├── datasets
│   │   ├── combine_A_and_B.py
│   │   ├── download_cyclegan_dataset.sh
│   │   ├── download_pix2pix_dataset.sh
│   │   ├── make_dataset_aligned.py
│   │   └── pbug_full
│   │       ├── test
│   │       │   └── curPose.jpg
│   │       ├── train
│   │       └── val
│   ├── docs
│   │   ├── datasets.md
│   │   ├── qa.md
│   │   └── tips.md
│   ├── environment.yml
│   ├── keras_openpose
│   │   ├── config
│   │   ├── config.py
│   │   ├── config_reader.py
│   │   ├── keras_openpose_test.py
│   │   ├── model
│   │   │   ├── get_keras_model.sh
│   │   │   └── keras
│   │   │       └── model.h5
│   │   ├── model.py
│   ├── LICENSE
│   ├── models
│   │   ├── base_model.py
│   │   ├── cycle_gan_model.py
│   │   ├── __init__.py
│   │   ├── networks.py
│   │   ├── pix2pix_model.py
│   ├── options
│   │   ├── base_options.py
│   │   ├── __init__.py
│   │   ├── test_options.py
│   │   └── train_options.py
│   ├── pbug_pix2pix
│   │   └── test_latest
│   │       └── images
│   │           ├── curPose_fake_B.jpg
│   │           ├── curPose_real_A.jpg
│   │           └── curPose_real_B.jpg
│   ├── pix2pix_class.py
│   ├── pix2pix_test.py
│   ├── pubgPoseFake.py
│   ├── scripts
│   │   ├── conda_deps.sh
│   │   ├── download_cyclegan_model.sh
│   │   ├── download_pix2pix_model.sh
│   │   ├── edges
│   │   │   ├── batch_hed.py
│   │   │   └── PostprocessHED.m
│   │   ├── eval_cityscapes
│   │   │   ├── caffemodel
│   │   │   │   └── deploy.prototxt
│   │   │   ├── cityscapes.py
│   │   │   ├── download_fcn8s.sh
│   │   │   ├── evaluate.py
│   │   │   └── util.py
│   │   ├── install_deps.sh
│   │   ├── test_before_push.py
│   │   ├── test_cyclegan.sh
│   │   ├── test_pix2pix.sh
│   │   ├── test_single.sh
│   │   ├── train_cyclegan.sh
│   │   └── train_pix2pix.sh
│   ├── test.py
│   ├── train.py
│   └── util
│       ├── get_data.py
│       ├── html.py
│       ├── image_pool.py
│       ├── __init__.py
│       └── visualizer.py
├── QtPoseImitate.pro
├── QtPoseImitate.pro.user
├── READMR.md
└── result
    ├── fake_out.avi
    └── pose_out.avi

CMU - OpenPose

使用预训练好的OpenPose COCO模型,使用下载脚本自动下载到pytorch_pix2pix/keras_openpose/model/keras/,大约209MB,在keras_openpose_test.py中提供API,请自行查看注释,支持视频和图片直接输入,计算输出结果图/视频。

pytorch-pix2pix

reference pix2pix README

pubg(刺激战场) dataset

pix2pix数据集图片格式参照_pix2pix Dataset_,请放置于pytorch_pix2pix/datasets/目录下。本项目官方数据集下载地址:baiduyun 链接:https://pan.baidu.com/s/1z9LjKF7WuIpCUoMir0uFzA  提取码:1d6n

results

src pose fake

poster

poster

License

本项目遵循开源协议MIT,其中不乏使用了一些开源代码,但是禁止商用!仅供相关领域爱好者研究学习!最终解释权归Frank(frankliu624@outlook.com)所有。 如使用过程中存在疑问,而README中介绍不详细,欢迎联系Frank帮您解决。

Citation

@article{frank2019pubg,
  title         = {基于对抗网络的游戏人物动作模仿与实现},
  author        = {Frank Liu},
  year          = {2019},
}

About

使用Qt实现的基于openpose和pix2pix对抗网络的游戏人物动作模拟。本科毕业设计。

License:MIT License


Languages

Language:Python 89.8%Language:C++ 5.8%Language:Shell 2.1%Language:MATLAB 1.2%Language:QMake 1.2%