rfelixmg / frwgan-eccv18

Code for model presented on our paper accepted on European Conference on Computer Vision 2018.
57 stars 23 forks source link

src/sota/sun/tester.sh does not work #7

Closed mbsariyildiz closed 5 years ago

mbsariyildiz commented 5 years ago

Hello @rfelixmg ,

Thank you for sharing your implementation.

I downloaded your dataset.zip folder and run scripts under src/sota/sun to reproduce your scores on SUN dataset.

The scripts created an experiment folder named: ./experiments/sota/sun/cycle_wgan/0000_TEST_130419_210747 where ls returns:

-checkpoint
-configuration_130419_210747.json
-git_version.json
-logs
-results
-source
-tensorboard_script.sh

I can share with you the experiment folder, if you need.

According to the contents/hierarchy of the experiment folder, I had to change tester.sh from

#!/usr/bin/env bash
_DBDIR_=./data/
_DATABASE_=sun
_CONFERENCE_=sota
_EPOCH_=epoch_85_85
_MODEL_=./experiments/$_CONFERENCE_/$_DATABASE_/cycle_wgan/classifier/checkpoint/$_EPOCH_/architecture.json

python -m routines.tester -db $_DATABASE_ -rc 1 --load_model $_MODEL_  --dataroot $_DBDIR_

to

#!/usr/bin/env bash
_DBDIR_=./data/
_DATABASE_=sun
_CONFERENCE_=sota
_EPOCH_=epoch_15_15
_MODEL_=./experiments/$_CONFERENCE_/$_DATABASE_/cycle_wgan/0000_TEST_130419_210747/checkpoint/classifier/$_EPOCH_/architecture.json

python -m routines.tester -db $_DATABASE_ -rc 1 --load_model $_MODEL_  --dataroot $_DBDIR_

But then tester.sh gave me this error:

Traceback (most recent call last):
  File "/home/X/frwgan/routines/tester.py", line 185, in <module>
    model, results = main(options=options, dataset=dataset, knn=knn)
  File "/home/X/frwgan/routines/tester.py", line 142, in main
    model = load_model(options.load_model, options.architecture.namespace)
  File "/home/X/frwgan/routines/aux.py", line 48, in load_model
    model = models.__dict__[mtype].__MODEL__()
KeyError: 'rwgan/classifier'

I think this is because "namespace": "rwgan/classifier" is defined in experiments/sota/sun/cycle_wgan/0000_TEST_130419_210747/checkpoint/classifier/epoch_15_15/architecture.json. But the weird thing is that running grep -r "rwgan/classifier" ./ in the root repository directory returns only the architecture file created by the experiments ./experiments/sota/sun/cycle_wgan/0000_TEST_130419_210747/checkpoint/classifier/epoch_15_15/architecture.json. Which means, you never/use 'rwgan/classifier' in your code.

Could you please help me resolving this issue?

rfelixmg commented 5 years ago

Dear @mbsariyildiz,

Please note that the you are refering to the cycle-WGAN model as being the fully connected classifier. In this paper, we present two models: 1) GAN model and 2) fully-connected classifier trained with the data-augmentation from the GAN model.

Note that, you still have to train the fully-classiifier using benchmark.sh

Cheers, Rafa.

mbsariyildiz commented 5 years ago

Hello @rfelixmg , Thank you for pointing out this. I was able to run benchmark.sh. The script ended with this expression: :: Logs: ./experiments/sota/sun/cycle_wgan/0000_TEST_130419_210747//0005_classifier_160419_223541 And in this directory, there is this tensorboard log file: image

But non of those scores are related to the ones you report in the paper. How do you think I can get the GZSL and ZSL results from this log?

Cheers, Bulent

mbsariyildiz commented 5 years ago

@rfelixmg , I solved the problem, now I can run tester.sh. Closing this issue. Thanks!

naumanbashir70 commented 4 years ago

Hi @mbsariyildiz

You have executed the code successfully!! Could you please guide me in solving this. I am using Google Colab . I run src/sota/awa1/train_gan.sh and I am getting error while saving checkpoints. It is giving error on symlink. Could you tell me which path you used for saving the checkpoints.

Much Appreciation.

error