Closed indrakumarmhaski closed 2 years ago
Finally, I got 0.9876 Accuracy for image attribution.
The problem was in the ordering of folders. Another problem was in CelebA images, I was using 128x128 CelebA images, later I realized that I should use the original images from CelebA dataset.
I'm getting only 0.1916 accuracy in image attribution task, in the test dataset in each of the five classes I've puted 1K generated images from respective GANs and 1K real images from CelebA, and I'm using the pre-trained model.
I'm using the following code in image_attribution_test.py file:
from torchvision import datasets, models, transforms
from model import *
import os import torch from torch.autograd import Variable from skimage import io from scipy import fftpack import numpy as np from torch import nn import datetime from models import encoder_image_attr from models import fen import torch.nn.functional as F from sklearn.metrics import accuracy_score from sklearn import metrics import argparse