ganomaly
ganomaly copied to clipboard
Custom dataset
Hi,
Thank you for the code, I tested it on the mnist and cifar datasets and it works fine.
I admit I'm very new with Pytorch, so it is possible that I'm making a very basic mistake.
I tried to upload my own dataset (RGB images 80x80 pixels) following the same structure you suggested. I used .png format and named the images exactly as you did.
The command I give is train.py --dataset mydata --isize 80 --niter 10
My problem is the code runs but it never start working (I have just one core at 100% but no GPU usage).
data.py sees the files in the folders correctly. I also tried to debug the rest of the code without big success. The run enters in model = Ganomaly(opt, dataloader)
but never gets out.
I changed the size of the dataset (reducing the images), but it seems to give the same problem.
Interrupting the code, it is always at the same point: File "/data/myPC/ganomaly/lib/networks.py", line 169, in __init__ self.decoder = Decoder(opt.isize, opt.nz, opt.nc, opt.ngf, opt.ngpu, opt.extralayers)
Thank you in advance for your answer!
hey,can you tell me how to train in custom dataset?
I have the same problem with you. Have you solved it now?
I finally find out that there is a bug in networks.py Class Decoder line 89-92. `
cngf, tisize = ngf // 2, 4
while tisize != isize:
cngf = cngf * 2
tisize = tisize * 2
` since your input imags size is 80, this circle would never stop, since 'tisize'(4,8,16,32,64,128,.....) will never equals isize(80).
If the Custom Dataset is configured as below, is the abnormal data of train folder also trained?
Custom Dataset
├── test
│ ├── 0.normal
│ │ └── normal_tst_img_0.png
│ │ └── normal_tst_img_1.png
│ │ ...
│ │ └── normal_tst_img_n.png
│ ├── 1.abnormal
│ │ └── abnormal_tst_img_0.png
│ │ └── abnormal_tst_img_1.png
│ │ ...
│ │ └── abnormal_tst_img_m.png
├── train
│ ├── 0.normal
│ │ └── normal_tst_img_0.png
│ │ └── normal_tst_img_1.png
│ │ ...
│ │ └── normal_tst_img_t.png
│ ├── 1.abnormal
│ │ └── abnormal_tst_img_0.png
│ │ └── abnormal_tst_img_1.png
│ │ ...
│ │ └── abnormal_tst_img_u.png
have you run the code succssuffuly on your dataset?
yes,but the result it is not successful, so i give up
At 2020-03-29 23:50:57, "lzzlxxlsz" [email protected] wrote:
have you run the code succssuffuly on your dataset?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
yes,but the result it is not successful, so i give up At 2020-03-29 23:50:57, "lzzlxxlsz" [email protected] wrote: have you run the code succssuffuly on your dataset? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
how dou you test your data ? does the test code made by yourself?
no, i never test
At 2020-04-02 14:48:09, "lzzlxxlsz" [email protected] wrote:
yes,but the result it is not successful, so i give up At 2020-03-29 23:50:57, "lzzlxxlsz" [email protected] wrote: have you run the code succssuffuly on your dataset? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
how dou you test your data ? does the test code made by yourself?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.