Giter VIP home page Giter VIP logo

pokegan's Introduction

pokeGAN

Creats new kinds of pokemons using WGAN! (DCGAN is also supported)

dependence

cv2
tensorflow( >=1.0)
scipy
numpy

how to use

git clone ‘https://github.com/moxiegushi/pokeGAN.git’
cd pokeGAN
python resize.py
python RGBA2RGB.py
python pokeGAN.py

example pokemons

image1

image2

It is difficult to train a GAN perfectly, and as you can see someimages are meaningless. I'm very new to this. Please let me know if there are bugs :)

pokegan's People

Contributors

moxiegushi 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pokegan's Issues

No License

Hi! I am making a kaggle notebook based on this but I am wondering, since I am producing a derivative work, could I get a license?

TY!

Error with RGBA2RGB.py

I am getting this error, not sure why
'''
data@Sidneys-iMac pokeGAN-master % python3 RGBA2RGB.py
Traceback (most recent call last):
File "RGBA2RGB.py", line 16, in
png.save(os.path.join(dst,each.split('.')[0] + '.jpg'), 'JPEG')
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PIL/Image.py", line 2099, in save
fp = builtins.open(filename, "w+b")
FileNotFoundError: [Errno 2] No such file or directory: './resized_black/66646859_399920300938859_3244893778049227704_n_18025660906206221.jpg'
data@Sidneys-iMac pokeGAN-master % python3 RGBA2RGB.py
Traceback (most recent call last):
File "RGBA2RGB.py", line 16, in
png.save(os.path.join(dst,each.split('.')[0] + '.jpg'), 'JPEG')
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/PIL/Image.py", line 2099, in save
fp = builtins.open(filename, "w+b")
FileNotFoundError: [Errno 2] No such file or directory: './resized_black/66646859_399920300938859_3244893778049227704_n_18025660906206221.jpg'
'''

Using Grayscale instead of RGB

To see if an image looks like a pokemon, I think the shape is more important than the color.
By using RGB, I think it will affect the network's ability to identify the shape.
Maybe we can try to use grayscale instead of RGB to test if it will help?

Why the Loss is negtive

Hi!
I run this pokeGAN by following the readme.md file.But I am confused that why the d_loss is a negative number? Could you explain it? I will really appreciate that. Thank you very much!

Pull Request for Python3 / Jupyter notebook implementation

I made the following modifications by forking your repo

  • Reorganised the folder structure
    • Folders - demo, src, data
  • Re-wrote the pre-processing steps
    • Automatically creates sub-folders within data folder
  • Made a demo folder with a jupyter notebook (also contains the model data and GAN images)
    • reason behind this was to see how the loss functions evolve over time.
    • there is still work to be done in this. I would like to show the test functions with some output

If my changes are acceptable to you, could you write back to my on my email?

Also, what GPU are you training on and how long did 5000 epochs take you?

File Not Found error

I called python RGBA2RGB.py after calling python resize.py but it is showing this error. Any idea why?

Traceback (most recent call last):
  File "RGBA2RGB.py", line 16, in <module>
    png.save(os.path.join(dst,each.split('.')[0] + '.jpg'), 'JPEG')
  File "C:\Users\Gautam\Anaconda3\lib\site-packages\PIL\Image.py", line 1932, in save
    fp = builtins.open(filename, "w+b")
FileNotFoundError: [Errno 2] No such file or directory: './resized_black/0.jpg'

Weights ?

Is the trained model available somewhere ?
Thanks :-)

Change output image size

I tried to change the pixel size of the output image. Also changing from an 8x8 grid into one single image that maybe has a higher resolution. But always get an error when changing the variables. Any idea how to change that?

Doesn't continue training from checkpoint.

Hello,

I'm having a minor issue when trying to continue an interrupted training.

As expected, these are created under model/NewPokemon in my working directory:
43688029-0db93a46-98ea-11e8-9ccf-8b440d9defb2 1

On this code I just couldn't make it continue from where it is left off. It starts from 0 back again when I run PokeGAN.py even though I'm running inside the directory and the folder structure seems correct. I have tried to comment out "sess.run(tf.global_variables_initializer())" and "sess.run(tf.local_variables_initializer())" but still it doesn't continue when I run pokemonGAN.py again.

I haven't modified the code except the fact that, mine saves the model every epoch instead of every 500 - just changed the modulo i%500 to i%1.

Any help would be much appreciated.

Thanks very much!

running resize.py error

Hey what does this error mean? Trying to use a new data set.

OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file /tmp/opencv-20180113-80339-d8g5mw/opencv-3.4.0/modules/imgproc/src/resize.cpp, line 4044
Traceback (most recent call last):
  File "resize.py", line 12, in <module>
    img = cv2.resize(img,(256,256))
cv2.error: /tmp/opencv-20180113-80339-d8g5mw/opencv-3.4.0/modules/imgproc/src/resize.cpp:4044: error: (-215) ssize.width > 0 && ssize.height > 0 in function resize

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.