Giter Club home page Giter Club logo

Comments (3)

Ldhlwh avatar Ldhlwh commented on August 29, 2024
  1. What parameters did you handle? (It may be a little rude, but I'm most curious about it.)

If you mean hyperparameters, we have presented all our choices in the codes and the paper. If you mean model parameters, you may have a look at the codes below.

for name, module, opt_kwargs, reg_interval in training_nets:
num_param = 0
if name == 'D':
if G_kwargs.transfer == 'res_block_uni_dis':
for res in [4, 8, 16, 32, 64, 128, 256]:
target_param = []
if res > D_kwargs.uni_st:
num_param += sum([p.numel() for p in getattr(module, f'mask_b{res}').parameters()])
target_param.append(getattr(module, f'mask_b{res}').parameters())
else:
num_param += sum([p.numel() for p in getattr(module, f'uni_b{res}').parameters()])
target_param.append(getattr(module, f'uni_b{res}').parameters())
target_param = itertools.chain(*target_param)
else:
num_param = sum([p.numel() for p in module.parameters()])
target_param = module.parameters()
elif name == 'D_match':
num_param = sum([p.numel() for p in module.parameters()])
target_param = module.parameters()
elif name == 'G':
if ft == 'default':
num_param = sum([p.numel() for p in module.parameters()])
target_param = module.parameters()
elif ft == 'ft_map':
num_param = sum([p.numel() for p in module.mapping.parameters()])
target_param = module.mapping.parameters()
elif ft == 'ft_syn':
num_param = sum([p.numel() for p in module.synthesis.parameters()])
target_param = module.synthesis.parameters()
elif ft.startswith('ft_syn_'):
num_trainable_block = int(ft.split('_')[-1])
syn_modules = [module.synthesis.b4, module.synthesis.b8, module.synthesis.b16, module.synthesis.b32, module.synthesis.b64, module.synthesis.b128, module.synthesis.b256]
target_param = itertools.chain(*[mod.parameters() for mod in syn_modules[:num_trainable_block]])
num_param = sum([p.numel() for p in target_param])
target_param = itertools.chain(*[mod.parameters() for mod in syn_modules[:num_trainable_block]])
elif ft.startswith('ft_map_syn_'):
num_trainable_block = int(ft.split('_')[-1])
syn_modules = [module.synthesis.b4, module.synthesis.b8, module.synthesis.b16, module.synthesis.b32, module.synthesis.b64, module.synthesis.b128, module.synthesis.b256]
target_param = itertools.chain(*[mod.parameters() for mod in syn_modules[:num_trainable_block]], module.mapping.parameters())
num_param = sum([p.numel() for p in target_param])
target_param = itertools.chain(*[mod.parameters() for mod in syn_modules[:num_trainable_block]], module.mapping.parameters())
elif ft == 'transfer':
if G_kwargs.transfer == 'dual_mod':
target_param = module.defect_mapping.parameters()
num_param = sum([p.numel() for p in target_param])
target_param = module.defect_mapping.parameters()
elif G_kwargs.transfer in ['res_block', 'res_block_match_dis', 'res_block_uni_dis']:
target_param = [module.defect_mapping.parameters()]
num_param += sum([p.numel() for p in module.defect_mapping.parameters()])
for res in [4, 8, 16, 32, 64, 128, 256]:
if res >= G_kwargs.synthesis_kwargs.res_st:
target_param.append(getattr(module.synthesis, f'res_b{res}').parameters())
num_param += sum([p.numel() for p in getattr(module.synthesis, f'res_b{res}').parameters()])
target_param = itertools.chain(*target_param)

2. Did you take other Augmentation tech except for ADA of StyleGAN2 - ADA ?

No, just ADA.

3. This is different from the point, when I generate a defective image in my dataset, in that model, both normal and defect images are generated and combined from Latent vector, but can I modify the model by inputting it into the normal image I have without generating the generated image and combining it with the generated defective image? (just generating defect images from latent vectors, but not for normal images. because, I think generated normal images of my industrial dataset will have poor quaility.)

If you believe you are not able to get a good base model generating defect-free images in the first stage, then our DFMGAN may not meet your requirement since it depends on well-learned object/texture features. You may consider anomaly generation methods of image-to-image pipeline like Defect-GAN.

from dfmgan.

lu1zero9 avatar lu1zero9 commented on August 29, 2024

Hi, I am graduate student in korea. I want to generate various defective industrial data images by utilizing your model, so before handling our datas, I use MVTec Wood datasets (Defect : Scratch) to confirm and check the model's performances.

But, when I train model and inference with wood datasets, Its result is quite different with your paper's result. Both Good and Mask images have not good quality than I expected. (Furthermore, It occurs Overfitting after 400 kimg in good images / Generated Defect images are not similar with MVTec dataset's original scratch things)

I want to know how to optimize the parameters ( that you used ) to develop image qualities.

  1. What parameters did you handle? (It may be a little rude, but I'm most curious about it.)
  2. Did you take other Augmentation tech except for ADA of StyleGAN2 - ADA ?
  3. This is different from the point, when I generate a defective image in my dataset, in that model, both normal and defect images are generated and combined from Latent vector, but can I modify the model by inputting it into the normal image I have without generating the generated image and combining it with the generated defective image? (just generating defect images from latent vectors, but not for normal images. because, I think generated normal images of my industrial dataset will have poor quaility.)

Thanks for reading! I appreciate for your model services.

Hi, have you generated all the results to check the effects? If so, could you please send me a copy of the generated results? I would like to take a look. Thank you very much, I appreciate it!

from dfmgan.

Ldhlwh avatar Ldhlwh commented on August 29, 2024

I'll close this issue for now since it's been inactive for weeks.

from dfmgan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.