sysu-imsl / EdgeGAN

Code for paper "SketchyCOCO: Image Generation from Freehand Scene Sketches" (CVPR 2020)
https://sysu-imsl.com/EdgeGAN/
45 stars 7 forks source link

issue running test example #3

Open gbernal opened 4 years ago

gbernal commented 4 years ago

HI @liuq99 Thank you for sharing your project.

I'm trying to run the test code following the instructions in the readme file

python -m edgegan.test --name=edgegan --dataroot=/home/PycharmProjects/EdgeGAN/data --dataset=bike --nomulticlasses --gpu=0

but I'm getting the following errors.

tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [100,8192] rhs shape= [114,8192]
         [[{{node save/Assign_56}}]]

During handling of the above exception, another exception occurred:
    err, "a mismatch between the current graph and the graph")
tensorflow.python.framework.errors_impl.InvalidArgumentError: Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:

Assign requires shapes of both tensors to match. lhs shape= [100,8192] rhs shape= [114,8192]
         [[node save/Assign_56 (defined at /.local/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py:1748) ]]

I'm guessing that it might be related to the data structure. Currently, this is how it is

EdegGAN
└───data 
   └──--bike
    └───train
       |   |    <file00>.png #data from the SketchyCOCO > Objects > Sketch > Train > 2 
       |   |    <file01>.png
       |   |    ...
       |   
    └───test
        |    <file00>.png # #data from the SketchyCOCO > Objects > Sketch > Val > 2 
        |    <file01>.png
        |    ...

Thank you and I look forward to your response.

Hongiee2 commented 3 years ago

I got the same problem, too.

I think the pre-trained model which link to google drive is multi classes model

So, the following command would not give you error python -m edgegan.test --name=edgegan --dataroot= --dataset= --gpu=

when I run it with multi classes command, there are not error but the result doesn't appear in test_output folder

I hope @liuq99 give us some help !

fjenett commented 3 years ago

Ran into the empty output folder problem too … I found that to run the multiclass model provided you have to provide it with the same directory structure as for training:

EdegGAN
└───data
    └───train
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>
    |   
    └───test
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>

Make sure that there is one directory for each class [0 ... 13] (for a 14 classes model). The directories can be empty if you are only testing one file … make sure to put it into the correct class directory.

lyhh123 commented 3 years ago

Could anyone run the test code following the instructions in the readme file successfully?

PaVaNTrIpAtHi commented 2 years ago

I got the same problem, too.

I think the pre-trained model which link to google drive is multi classes model

So, the following command would not give you error python -m edgegan.test --name=edgegan --dataroot= --dataset= --gpu=

when I run it with multi classes command, there are not error but the result doesn't appear in test_output folder

I hope @liuq99 give us some help !

Same with me

PaVaNTrIpAtHi commented 2 years ago

Ran into the empty output folder problem too … I found that to run the multiclass model provided you have to provide it with the same directory structure as for training:

EdegGAN
└───data
    └───train
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>
    |   
    └───test
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>

Make sure that there is one directory for each class [0 ... 13] (for a 14 classes model). The directories can be empty if you are only testing one file … make sure to put it into the correct class directory.

Did you get the output by this method?

CTangist commented 1 year ago

Could anyone run the test code following the instructions in the readme file successfully?

Hello, may I ask you to reproduce successfully now, how to deploy the data set?

anzal1 commented 10 months ago

Ran into the empty output folder problem too … I found that to run the multiclass model provided you have to provide it with the same directory structure as for training:

EdegGAN
└───data
    └───train
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>
    |   
    └───test
    |   └─── 0
    |   |    └──<file01>.png
    |   |    └── ...
    |   | 
    |   └─── 1
    |   |   ...
    |   └───<num of classes>

Make sure that there is one directory for each class [0 ... 13] (for a 14 classes model). The directories can be empty if you are only testing one file … make sure to put it into the correct class directory.

Did you get the output by this method?

yup you have to make a folder before the test directory , names as class for ex it executes without any issue and produces output if the test folder is inside a folder named class14

aheroro commented 1 month ago

In which folder should GT be placed?