Comments (13)
I am glad you are interested in our work.
- we use python 3.6, PyTorch 1.4 and sklearn 0.22.2 for our code.
- we have provided the command examples to achieve the pkl files, the extracted activation file is too large so we do not provide it. It can easily get with the first "extract feature" command line.
If there are still any trouble to try our code, feel free to tell me.
from giqa.
Thank you for your answer.
I have a little question want to ask you. During the execution of Extract features orders, what is stored in the path/to/dataset is your cat.rar and city.rar or our own test data set,or empty folders, I have set up a path for path/to/dataset. I have set up a path for the path/to/dataset.
I currently run directly to the python you give write_act. Py path/to/dataset - act_path path/to/activation - 0.95 - pca_path pca_rate path/to/pca - gpu gpu_id, path is one of my new folder, inside of a dataset, activation, pca is a new empty folder
Are the activation files generated automatically during Extract features command run, I have downloaded the GMM - cat - pca95 - full7. PKL and pca95 - the PKL, should how to apply?
Thank you very much!
from giqa.
- The path/to/dataset should point to the folder contains raw images like jpg or png, similar to pytorch-fid code (https://github.com/mseitzer/pytorch-fid) in the reference.
- Yes, the activation files generated automatically from the Extract features command line. After you download the GMM file, just use "python gmm_score.py path/to/test-folder --gmm_path path/to/gmm --pca_path path/to/pca --output_file output/file/path --gpu gpu_id" to get the GMM-GIQA score. If you only have the activation file or you just want to get the KNN-GIQA score, just use "python knn_score.py path/to/test-folder --act_path path/to/activation --pca_path path/to/pca --K number/of/nearest-neighbor --output_file output/file/path --gpu gpu_id". But usually it will cost more time especially the dataset is large.
from giqa.
Thank you
I tried to run the Extract features"
where i put your city.rar, in the path/to/dataset, but in the runtime prompt "“IsADirectoryError: [Errno 21] Is a directory: 'path/to/pca'”what kind of file should i put in the'path/to/pca'"
Previously, I incorporated your cat.rar and city.rar into the path/to/dataset,it shows “ValueError: could not broadcast input array from shape (256,256,3) into shape (256)”,Why is that,Which data set should I put in at run time.
So if I want to get the relevant scores for the coco data set dcgan generated,Should I put coco test data set or what data set in my path/to/dataset?
Thank you very much for your reply.
from giqa.
Thank you
I tried to run the Extract features"
where i put your city.rar, in the path/to/dataset, but in the runtime prompt "“IsADirectoryError: [Errno 21] Is a directory: 'path/to/pca'”what kind of file should i put in the'path/to/pca'"
Previously, I incorporated your cat.rar and city.rar into the path/to/dataset,it shows “ValueError: could not broadcast input array from shape (256,256,3) into shape (256)”,Why is that,Which data set should I put in at run time.
So if I want to get the relevant scores for the coco data set dcgan generated,Should I put coco test data set or what data set in my path/to/dataset?
Thank you very much for your reply.
- You should extract the rar file to jpg and png images
- for extract features command line, the path/to/pca is one of the output, so you should give a path and name to the pca file, such as pca.pkl
- if you want to get the scores of DCGAN generated images on coco dataset, in extract features command line, path/to/dataset should be coco dataset, in get score command line, path/to/dataset should be the folder of DCGAN generated images.
from giqa.
Thank you for your help, but one problem I encountered during debugging “Extract features”is
“ File "GIQA-master/write_act.py", line 67, in get_activations
images = images.transpose((0, 3, 1, 2))
ValueError: axes don't match array”
now my dataset is vg,I'm trying to turn the grayscale image into a three way,Still showing the same problem。What is the reason?How should I solve it? Thank you for your help
from giqa.
Thank you for your help, but one problem I encountered during debugging “Extract features”is
“ File "GIQA-master/write_act.py", line 67, in get_activations
images = images.transpose((0, 3, 1, 2))
ValueError: axes don't match array”
now my dataset is vg,I'm trying to turn the grayscale image into a three way,Still showing the same problem。What is the reason?How should I solve it? Thank you for your help
I think it may be caused by the wrong image file. You may check and debug it yourself.
from giqa.
Thank you for your reply!
So, I would like to ask, are all the photos in your dataset color images?Are there any restrictions on image data sets?
from giqa.
Thank you for your reply!
So, I would like to ask, are all the photos in your dataset color images?Are there any restrictions on image data sets?
Only color images are ok. It's better to use enough data with enough resolution.
from giqa.
Thank you.
I have removed all grayscale images,But when running : python write_act.py img/image --act_path activation/vg.pkl --pca_rate 0.95 --pca_path pca/pca95-cat.pkl --gpu 1 ,still showing error:
File "write_act.py", line 70, in get_activations
images = images.transpose((0, 3, 1, 2))
ValueError: axes don't match array
What's the reason?
I tried the online approach, all of which was to change the image to RGB,but there's still no solution.
Thank you very much for your reply。
from giqa.
This is the shape of some of the pictures I listed, all three channels.my environment is my environment。
(375, 500, 3)
(427, 640, 3)
(640, 425, 3)
(640, 427, 3)
(427, 640, 3)
(640, 424, 3)
(375, 500, 3)
(423, 640, 3)
(480, 640, 3)
(480, 640, 3)
(640, 426, 3)
(640, 419, 3)
(640, 640, 3)
from giqa.
If your images are not in the same size, you need to resize them to the same size, then the error will be fixed.
from giqa.
If your images are not in the same size, you need to resize them to the same size, then the error will be fixed.
And also, for building GMM model or just using KNN-GIQA, the number of images to get activation should not be too small, I am not sure what dataset you are trying to apply, but I think it should at least have 5000 images to get a good result.
from giqa.
Related Issues (14)
- how to train the pca file? HOT 3
- Performing GMM is time-consuming HOT 2
- Reproducibility HOT 4
- Some help for custom dataset
- ValueError: Expected the input data X have 774 features, but got 38 features HOT 1
- Getting large negative GMM-GIQA scores HOT 2
- Request for FFHQ dataset
- the GMM_score is not between [0, 1] HOT 4
- Two questions about write_act.py HOT 1
- can you provide a FFHQ pretrain model ? I will appreciate you doing this. HOT 1
- Details HOT 12
- some question
- ValueError: could not broadcast input array from shape (512,936,3) into shape (512) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from giqa.