The first task entry GAN

        In-use detector as industrial quality control process, there are a lot of qualified products, but less substandard products and shapes. In order to enhance the data set, we need to generate a lot of pictures of substandard products. Specifically, I have to generate a flawed Magnets. This is the background.

        Alternative would have two tasks, one of which is my research generated by GAN, so do not hesitate to chose this (another forgotten).

        The boss said, this task is not in a hurry, so I felt how interesting how come. It is important to play with your own fun ~ fun ~ (the work of true leisure). After you can try more than one network, write it modular, easy to use. All we have are aimed lazy (strongly agree).

        So, for lazy, I'm going to find that running pix2pix to see results. Based on this framework and then inside the module plus other models Jiuhaola.

        So far only pix2pix, cycleGAN (for this project much good), non-stationary-texture GAN (read today just added to the list through regulation). In order not to spend my passion to write blog, they receive non-stationary-texture GAN began to write it directly.

1. pix2pix

slightly

2. Non-stationary-texture GAN

        At present, the model generates a smooth texture is already a lot, but there are many non-stationary nature of textures, these textures have not generated problems to solve. This article presents a non-smooth texture generation model. Once trained, the input a texture map, the model can be expanded in size, extending its texture (see below). At present, the existing model is not better than the effect of this article. (Article published in August 2018)

         Paper did not look, just look at the code, the code is based on cycleGAN reform (great not my handwriting into the module).

         Pix2pix codes and similar, with the input real_A real_B, generated by the real_A fake_B, and then real_B fake_B do loss. The difference is that:


  • A large texture maps, a random cut (256 * 256) as real_B; real_B randomly cut on a (128 * 128) as real_A;
  • real_A through the generator. Here deconvolution process of decoding an added layer, the original side length doubled, generating fake_B;
  • Plus the style of vgg loss. A total of loss_L1 (fake_B, real_B), loss_GAN, loss_style.
  • Throughout the only run with a map, which is only this kind of texture.

        Fortunately, however, only one magnetic material texture also, quite in line with the conditions of the paper.

  • Magnets cut texture, training;
  • Test effect of different textures as generated inputs.

Guess you like

Origin blog.csdn.net/qq_26271435/article/details/95085748