GithubHelp home page GithubHelp logo

picsart-ai-research / mi-gan Goto Github PK

View Code? Open in Web Editor NEW
380.0 8.0 36.0 29.6 MB

[ICCV 2023] MI-GAN: A Simple Baseline for Image Inpainting on Mobile Devices

License: MIT License

Python 89.69% Shell 0.54% C++ 3.00% Cuda 6.77%
image-inpainting knowledge-distillation object-removal mi-gan mobile-inpainting re-parameterization

mi-gan's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mi-gan's Issues

problem when loading model

Error(s) in loading state_dict for Generator:
Missing key(s) in state_dict: "synthesis.b8.conv1.upsample.insert_zeros.weight", "synthesis.b8.upsample.insert_zeros.weight", "synthesis.b16.conv1.upsample.insert_zeros.weight", "synthesis.b16.upsample.insert_zeros.weight", "synthesis.b32.conv1.upsample.insert_zeros.weight", "synthesis.b32.upsample.insert_zeros.weight", "synthesis.b64.conv1.upsample.insert_zeros.weight", "synthesis.b64.upsample.insert_zeros.weight", "synthesis.b128.conv1.upsample.insert_zeros.weight", "synthesis.b128.upsample.insert_zeros.weight", "synthesis.b256.conv1.upsample.insert_zeros.weight", "synthesis.b256.upsample.insert_zeros.weight".
Unexpected key(s) in state_dict: "synthesis.b8.conv1.upsample.filter_const", "synthesis.b8.upsample.filter_const", "synthesis.b16.conv1.upsample.filter_const", "synthesis.b16.upsample.filter_const", "synthesis.b32.conv1.upsample.filter_const", "synthesis.b32.upsample.filter_const", "synthesis.b64.conv1.upsample.filter_const", "synthesis.b64.upsample.filter_const", "synthesis.b128.conv1.upsample.filter_const", "synthesis.b128.upsample.filter_const", "synthesis.b256.conv1.upsample.filter_const", "synthesis.b256.upsample.filter_const".

Bad results

Without composition, just looking at the output of places 512 model, it looks so horrible, even the inpainted area doesn't seem up-to-par with the paper. Look at this example
Here's the original image
img

Here's the mask
mask

Here's the direct output (without composition)
debug

Looks so horrible, how did you report such a low FID score?

problem when export inference model

Hi
Thanks for your work.
I am expressing that when I use the export_inference_model.py file to attempt to convert the pkl file to onnx, I encountered an error. Could you please help me identify the issue?

File "MI-GAN/scripts/export_inference_model.py", line 119, in main
    resume_data = pickle.Unpickler(f).load()
ModuleNotFoundError: No module named 'lib.model_zoo.simpleinpainting'

Differences in indicators between pt model and onnx model on the same data set

After I exported the pt model you posted as an onnx model, I found that there were index differences on the same data set. Could you please tell me why?

type metric
pkl model {'FID': 11.7524, 'LPIPS': 0.2391} bs32
pt model {'FID': 11.7524, 'LPIPS': 0.2391} bs32
pt model {'FID': 11.7549, 'LPIPS': 0.2391} bs1
onnx {'FID': 46.1999, 'LPIPS': 0.1436} bs1

Structure of the MI-GAN inference model different from the one used for training?

Hello,

Thank you for the amazing and insightful work! I was trying to train the model on my own set of images. However, I noticed that the number of parameters in the MIGAN generator part of the model that is used to train the model is very different from the one for which the checkpoint was provided (52 M vs 5.9 M respectively). Maybe I missed something here but could you please help me understand this? Thanks!

Some questions about MI-GAN

MI-GAN is a great job, thank you for open source! I would like to ask a few questions:

  1. What are your reasons for not using a loss function like L1? Will using this pixel-by-pixel supervised loss affect the final result?
  2. The current image resolution on the mobile devices is relatively high, and the model can only handle low-resolution images, such as 512, and the result is blurry. Is there any better solution?
  3. The default parameter for model re-parameterization in the code is 4, but the parameter mentioned in the paper is 8. Which number is more appropriate?
    Apologies for the disturbance, and I am looking forward to your response. Thank you very much!

How do I train myself with labeled data sets?

Thank you very much for your work. I plan to train my own data set. The current data set is the original picture 'images' and the labels' masks' made by me, but the masks you gave me are data/places2/train_512, so is the train_512 folder corresponding to the original picture? I see that your mask code is randomly generated, so I would like to ask, how do I train myself with labeled data sets? How to configure the file? How do you put the data set?

License

Hello and thank you for your amazing work. May I ask if you ever have the intent to release the license. Without it, no one can use your source code to do anything.

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.