Giter Club home page Giter Club logo

deepnude_nowatermark_withmodel's Introduction

DeepNude

DeepNude Source Code

DeepNude源代码 - 基于GAN的一条命令给小姐姐“换"衣服

去水印 (without watermark)

带三个模型.lib文件下载地址 (with the download link of the 3 model files:cm.lib,mm.lib,mn.lib)

供广大程序员技术交流使用 (for research and development communication)

demo地址: demo很原始脆弱不鲁棒,所以感兴趣的话尽量还是自己去跑代码吧。不要对demo做坏事哦,不然就关掉= =

Preinstallation

Before launch the script install these packages in your Python3 environment:

  • numpy
  • Pillow
  • setuptools
  • six
  • pytorch
  • torchvision
  • wheel

建议使用Conda安装 :)

 conda create -n deepnude -c anaconda python=3.6 numpy Pillow setuptools six pytorch torchvision wheel
 conda activate deepnude

注:如果懒得折腾Python环境,也可以使用docker一键运行,见下

感谢网友飞哥提供docker一键运行部分技术支持

使用docker一键运行

cd ~

git clone https://github.com/zhengyima/DeepNude_NoWatermark_withModel.git deepnude

cd deepnude

docker run --rm -it -v $PWD:/app:rw ababy/python-deepnude /bin/bash

python main.py

注意: docker运行只能使用cpu,所以,需要修改gpu运行为cpu, 修改方法请参考 #GPU. 实际运行速度也慢不了多少

Models

  • CLI Checkpoints: 在运行之前需下载三个.lib文件,之后在项目根目录下新建checkpoints目录,将下载的三个文件放至checkpoints目录下

  • 备用磁力链接:

magnet:?xt=urn:btih:7BE4EB8D640742D2FFEBD6495E9392E9E2C399BC

若以上Google drive链接挂了可使用该链接。下载速度还蛮快的:)

Launch the script

环境配好,模型下好之后便可以运行代码了!

 python main.py

The script will transform input.png to output.png.

如果想要使用自己的图片进行测试,需手动将图片尺寸调整至512x512大小,否则会报错!! #issue 5

GPU

本项目默认使用id为0的GPU运行。 (default use GPU with id 0. if your environment do not have GPU, please modify the code in gan.py)

若运行环境不带GPU,则报错。如果没有GPU或想使用CPU运行程序,请将gan.py中

self.gpu_ids = [0] #FIX CPU

改为 (to)

self.gpu_ids = [] #FIX CPU

Links

deepnude_nowatermark_withmodel's People

Contributors

fizzday avatar zhengyima avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

deepnude_nowatermark_withmodel's Issues

what's the version of opencv-python?

Hi , firstly thanks for your model. Could you please tell me what's the version of opencv? It always throws an exception when I call the function. Thanks a lot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.