Git Product home page Git Product logo

repair_base_dcgan's Introduction

repair_base_DCGAN

Version of package

package version
tensorflow 1.8.0
python-opencv 3.4.0
configparser

Due to the limitation of devices, I use the tensorflow-cpu, the tesorflow-gpu surely can be a better substitude.

Create your dataset

  Here is some tools for making dataset in image_util.py. Anyway, the shape of facial image should be (64 x 64 x 3).Then put the facial image in 'data_1' folder.

Train

  Checking the 'net.cfg' is neccssary before running 'cly_dcgan.py'. The model would be saved in the folder 'model'. You can get loss detail showed in tensorboard. And images generated by G would be saved in folder 'result', shows the preformance of net. You can stop the trainning if you are satisfy with the generated image. If the trainning was stopped accidently, you can recover the model with code in line 170 in 'cly_dcgan.py'.

Repair

  Now we have some good model choosable, replace the number of 'model_index' in 'bet.cfg' with index of choosed model. Put the image to be repaired in somewhere and modify the path of 'target_path' in 'net.cfg'. Run 'repair.py'. The relevent result would be saved in folder 'repair'. Revise the code in method 'get_target_img()' in 'image_util.py' if you want to change the area of target image to be repaird(generated), it’s really inconvenient...

repair_base_dcgan's People

Contributors

mt-cly avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.