Skip to content

Custom models - predictions don't seem to be influenced by camera input #10

@newt-beach

Description

@newt-beach

Hello :)

I'm encountering an issue running my own models generated through pix2pix-tensorflow. Check out the following video:

Untitled.mp4

In the video I'm switching between two pre-trained TF models: The model you provided from Google Art, and generated from pictures of animals. Notice that when I switch to the animal model, the prediction window looks like a fast slideshow of existing animal pictures.. it doesn't seem to be affected much by the input from the camera. When I switch to the GArt model, it looks as expected.

I have tried creating models from animals, flowers, and even other artworks. Image sets have ranged in size from 100 to 8,000 pictures. I have tried different numbers of epochs (ranging from 10 to 500), as well as different batch sizes. When I put any of these through webcam-pix2pix, I get the same "slideshow" effect. I just can't seem to make the predictions look like the input from the webcam. Tweaking the capture/processing parameters on the options panel doesn't do anything, either.

When I train the models, I follow the instructions listed here and on the pix2pix page, with one caveat: I am not doing the "export" step because doing so causes webcam-pix2pix to throw an error. Instead, I am using the models as they are exported from "train". This is my first suspect for why my output is looking weird, but I'm not certain. The error I get when running an exported model is this:
InvalidArgumentError (see above for traceback): You must feed a value for placeholder tensor 'input' with dtype float and shape [256,256,3]

My commands for training/exporting models vary but are generally of the form:
python pix2pix.py --mode train --input_dir ../meta-mirror/image-data/animals_canny --output_dir ../meta-mirror/models/animals-temp --which_direction BtoA
python pix2pix.py --mode export --input_dir ../meta-mirror/image-data/animals_canny --output_dir ../meta-mirror/models/animals --checkpoint ../meta-mirror/models/animals-temp

I have tested the models as well and they all look as expected:
image

Would love some advice on what I could be doing differently. I am using Tensorflow v.1.13.1 for both training and prediction. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions