Coder Social home page Coder Social logo

Assertion error about deep-makeover HOT 5 CLOSED

david-gpu avatar david-gpu commented on August 15, 2024
Assertion error

from deep-makeover.

Comments (5)

subzerofun avatar subzerofun commented on August 15, 2024

Hey maybe i can help. You said you have created the list_attr_celeba.txt file – did you download the
file or did you just create an empty one? The file contains quite a lot of data that's crucial for the training. You can download the txt files from my working dataset folder here: https://we.tl/fhGdPXS79t or the original one from here:
https://www.dropbox.com/sh/8oqt9vytwxb3s4r/AAA8YmAHNNU6BEfWMPMfM6r9a/Anno?dl=0

Put all the txt files in your dataset folder and try it again 😁

You also need to use the "Align&Cropped Images" archive:
https://www.dropbox.com/sh/8oqt9vytwxb3s4r/AADSNUu0bseoCKuxuI5ZeTl1a/Img?dl=0&preview=img_align_celeba.zip
not the "In-The-Wild Images".

The file should look like this:

202599
5_o_Clock_Shadow Arched_Eyebrows Attractive Bags_Under_Eyes Bald Bangs Big_Lips Big_Nose Black_Hair Blond_Hair Blurry Brown_Hair Bushy_Eyebrows Chubby Double_Chin Eyeglasses Goatee Gray_Hair Heavy_Makeup High_Cheekbones Male Mouth_Slightly_Open Mustache Narrow_Eyes No_Beard Oval_Face Pale_Skin Pointy_Nose Receding_Hairline Rosy_Cheeks Sideburns Smiling Straight_Hair Wavy_Hair Wearing_Earrings Wearing_Hat Wearing_Lipstick Wearing_Necklace Wearing_Necktie Young 
000001.jpg -1  1  1 -1 -1 -1 -1 -1 -1 -1 -1  1 -1 -1 -1 -1 -1 -1  1  1 -1  1 -1 -1  1 -1 -1  1 -1 -1 -1  1  1 -1  1 -1  1 -1 -1  1
000002.jpg -1 -1 -1  1 -1 -1 -1  1 -1 -1 -1  1 -1 -1 -1 -1 -1 -1 -1  1 -1  1 -1 -1  1 -1 -1 -1 -1 -1 -1  1 -1 -1 -1 -1 -1 -1 -1  1 
(... and a lot more lines 😀 )

from deep-makeover.

subzerofun avatar subzerofun commented on August 15, 2024

Just look at your errors: line 159 of dm_main.py starts loading the training files:

train_data = _get_train_data()

line 93 sets the source images:

source_images = dm_input.input_data(sess, 'train', selected)

next, on line 11 of dm_input.py:

    assert mode == 'inference' or len(filenames) >= FLAGS.test_vectors

So maybe the filenames (and features) can't get loaded because your list_attr_celeba.txt is empty?

from deep-makeover.

danchokobo avatar danchokobo commented on August 15, 2024

@subzerofun Hi! so I downloaded your files and put it in dataset,
Then again run it =>

69714 source images selected
78610 target images selected

Generator input (feature) size is 100 x 80 x 3 = 24000
Generator has 0.59M parameters

Discriminator input (feature) size is 100 x 80 x 3 = 24000
Discriminator has 0.84M parameters

Traceback (most recent call last):
File "dm_main.py", line 169, in
tf.app.run()
File "/Users/oteldanagul/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 43, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "dm_main.py", line 159, in main
train_data = _get_train_data()
File "dm_main.py", line 106, in _get_train_data
train_model = dm_model.create_model(sess, source_images, target_images, annealing, verbose=True)
File "/Users/oteldanagul/Downloads/deep-makeover-master/dm_model.py", line 214, in create_model
gene_loss = _generator_loss(source_images, gene_out, disc_fake_out, annealing)
File "/Users/oteldanagul/Downloads/deep-makeover-master/dm_model.py", line 135, in _generator_loss
gene_adversarial_loss = tf.nn.sigmoid_cross_entropy_with_logits(logits=disc_fake_output, labels=tf.ones_like(disc_fake_output))
TypeError: sigmoid_cross_entropy_with_logits() got an unexpected keyword argument 'labels'

from deep-makeover.

danchokobo avatar danchokobo commented on August 15, 2024

@david-gpu @subzerofun I updated version of tensorflow, then I have thats kind of results:
Am I on right way of processing images????

2017-02-08 13 50 59

from deep-makeover.

subzerofun avatar subzerofun commented on August 15, 2024

David wrote in the readme:

I recommend training the model for about 40,000 to 50,000 batches.

You will need to adjust --train_time depending on how many batches/hour your system can train.

Each of these two examples were made after training a model for just two hours on one GTX 1080 GPU.

The default training time is 120min. But how far the training gets, how many batches are generated depends on the speed of your system (GPU or CPU). David uses the fastest consumer card from Nvidia out there, the GTX 1080 with 8 GB VRAM.

Does your Mac even have a Nvidia graphics card? Have you installed CUDA?

iMac or MacBook – which model?

Computation on a (recent) GPU is significantly faster than on the CPU.
Read here why:
https://www.quora.com/Why-are-GPUs-well-suited-to-deep-learning
http://navoshta.com/cpu-vs-gpu/

So if you don't have a GPU (or haven't configured it) Tensorflow will use your CPU.

My Nvidia GTX 780 generated 16 batch pngs in 25min (batch nr. 3000).
So if you let it run on your machine for two hours and only got 3 pngs, then your MacBook/iMac is simply too slow! As David said, you need 40,000 to 50,000 batches to get good results. If you got 3 pngs in 120min, then you only have trained 400 batches. That's not enough to generate believable images!

This code is intended for training on the GPU – or on a powerful multicore processor.

Check if your Mac has a graphics card – then try to install CUDA (for Nvidia) or OpenCL (for AMD) and configure it for Tensorflow.
https://www.tensorflow.org/get_started/os_setup

from deep-makeover.

Related Issues (13)

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.