[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-9715":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":45,"readmeContent":46,"aiSummary":47,"trendingCount":16,"starSnapshotCount":16,"syncStatus":48,"lastSyncTime":49,"discoverSource":50},9715,"lama","advimman\u002Flama","advimman","🦙  LaMa Image Inpainting, Resolution-robust Large Mask Inpainting with Fourier Convolutions, WACV 2022","https:\u002F\u002Fadvimman.github.io\u002Flama-project\u002F",null,"Jupyter Notebook",10033,1066,84,108,0,4,17,96,16,44.08,"Apache License 2.0",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"cnn","colab","colab-notebook","computer-vision","deep-learning","deep-neural-networks","fourier","fourier-convolutions","fourier-transform","gan","generative-adversarial-network","generative-adversarial-networks","high-resolution","image-inpainting","inpainting","inpainting-algorithm","inpainting-methods","pytorch","2026-06-12 02:02:11","# 🦙 LaMa: Resolution-robust Large Mask Inpainting with Fourier Convolutions\n\nby Roman Suvorov, Elizaveta Logacheva, Anton Mashikhin, \nAnastasia Remizova, Arsenii Ashukha, Aleksei Silvestrov, Naejin Kong, Harshith Goka, Kiwoong Park, Victor Lempitsky.\n\n\u003Cp align=\"center\" \"font-size:30px;\">\n  🔥🔥🔥\n  \u003Cbr>\n  \u003Cb>\nLaMa generalizes surprisingly well to much higher resolutions (~2k❗️) than it saw during training (256x256), and achieves the excellent performance even in challenging scenarios, e.g. completion of periodic structures.\u003C\u002Fb>\n\u003C\u002Fp>\n\n[[Project page](https:\u002F\u002Fadvimman.github.io\u002Flama-project\u002F)] [[arXiv](https:\u002F\u002Farxiv.org\u002Fabs\u002F2109.07161)] [[Supplementary](https:\u002F\u002Fashukha.com\u002Fprojects\u002Flama_21\u002Flama_supmat_2021.pdf)] [[BibTeX](https:\u002F\u002Fsenya-ashukha.github.io\u002Fprojects\u002Flama_21\u002Fpaper.txt)] [[Casual GAN Papers Summary](https:\u002F\u002Fwww.casualganpapers.com\u002Flarge-masks-fourier-convolutions-inpainting\u002FLaMa-explained.html)]\n \n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fdrive\u002F15KTEIScUbVZtUP6w2tCDMVpE-b1r9pkZ?usp=drive_link\">\n  \u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\"\u002F>\n  \u003C\u002Fa>\n      \u003Cbr>\n   Try out in Google Colab \n  \u003Cbr>\n  All yandex dist links went bad, you can download the model from the https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1B2x7eQDgecTL0oh3LSIBDGj0fTxs6Ips?usp=sharing \n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fsenya-ashukha\u002Fsenya-ashukha.github.io\u002Fmaster\u002Fprojects\u002Flama_21\u002Fezgif-4-0db51df695a8.gif\" \u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fsenya-ashukha\u002Fsenya-ashukha.github.io\u002Fmaster\u002Fprojects\u002Flama_21\u002Fgif_for_lightning_v1_white.gif\" \u002F>\n\u003C\u002Fp>\n\n\n\n# LaMa development\n(Feel free to share your paper by creating an issue)\n- https:\u002F\u002Fgithub.com\u002Fgeekyutao\u002FInpaint-Anything --- Inpaint Anything: Segment Anything Meets Image Inpainting\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fgeekyutao\u002FInpaint-Anything\u002Fmain\u002Fexample\u002FMainFramework.png\" \u002F>\n\u003C\u002Fp>\n\n- [Feature Refinement to Improve High Resolution Image Inpainting](https:\u002F\u002Farxiv.org\u002Fabs\u002F2206.13644) \u002F [video](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=gEukhOheWgE) \u002F code https:\u002F\u002Fgithub.com\u002Fadvimman\u002Flama\u002Fpull\u002F112 \u002F by Geomagical Labs ([geomagical.com](geomagical.com))\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fsenya-ashukha\u002Fsenya-ashukha.github.io\u002Fmaster\u002Fimages\u002FFeatureRefinement.png\" \u002F>\n\u003C\u002Fp>\n\n# Non-official 3rd party apps:\n(Feel free to share your app\u002Fimplementation\u002Fdemo by creating an issue)\n\n- https:\u002F\u002Fgithub.com\u002Fenesmsahin\u002Fsimple-lama-inpainting - a simple pip package for LaMa inpainting.\n- https:\u002F\u002Fgithub.com\u002Fmallman\u002FCoreMLaMa - Apple's Core ML model format\n- [https:\u002F\u002Fcleanup.pictures](https:\u002F\u002Fcleanup.pictures\u002F) - a simple interactive object removal tool by [@cyrildiagne](https:\u002F\u002Ftwitter.com\u002Fcyrildiagne)\n    - [lama-cleaner](https:\u002F\u002Fgithub.com\u002FSanster\u002Flama-cleaner) by [@Sanster](https:\u002F\u002Fgithub.com\u002FSanster\u002Flama-cleaner) is a self-host version of [https:\u002F\u002Fcleanup.pictures](https:\u002F\u002Fcleanup.pictures\u002F)\n- Integrated to [Huggingface Spaces](https:\u002F\u002Fhuggingface.co\u002Fspaces) with [Gradio](https:\u002F\u002Fgithub.com\u002Fgradio-app\u002Fgradio). See demo: [![Hugging Face Spaces](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002Fakhaliq\u002Flama) by [@AK391](https:\u002F\u002Fgithub.com\u002FAK391)\n- Telegram bot [@MagicEraserBot](https:\u002F\u002Ft.me\u002FMagicEraserBot) by [@Moldoteck](https:\u002F\u002Fgithub.com\u002FMoldoteck), [code](https:\u002F\u002Fgithub.com\u002FMoldoteck\u002FMagicEraser)\n- [Auto-LaMa](https:\u002F\u002Fgithub.com\u002Fandy971022\u002Fauto-lama) = DE:TR object detection + LaMa inpainting by [@andy971022](https:\u002F\u002Fgithub.com\u002Fandy971022)\n- [LAMA-Magic-Eraser-Local](https:\u002F\u002Fgithub.com\u002Fzhaoyun0071\u002FLAMA-Magic-Eraser-Local) = a standalone inpainting application built with PyQt5 by [@zhaoyun0071](https:\u002F\u002Fgithub.com\u002Fzhaoyun0071)\n- [Hama](https:\u002F\u002Fwww.hama.app\u002F) - object removal with a smart brush which simplifies mask drawing.\n- [ModelScope](https:\u002F\u002Fwww.modelscope.cn\u002Fmodels\u002Fdamo\u002Fcv_fft_inpainting_lama\u002Fsummary) = the largest Model Community in Chinese by  [@chenbinghui1](https:\u002F\u002Fgithub.com\u002Fchenbinghui1).\n- [LaMa with MaskDINO](https:\u002F\u002Fgithub.com\u002Fqwopqwop200\u002Flama-with-maskdino) = MaskDINO object detection + LaMa inpainting with refinement by [@qwopqwop200](https:\u002F\u002Fgithub.com\u002Fqwopqwop200).\n- [CoreMLaMa](https:\u002F\u002Fgithub.com\u002Fmallman\u002FCoreMLaMa) - a script to convert Lama Cleaner's port of LaMa to Apple's Core ML model format.\n\n# Environment setup\n\n❗️❗️❗️ All yandex dist links went bad, you can download the model from the [google drive](https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1B2x7eQDgecTL0oh3LSIBDGj0fTxs6Ips?usp=sharing) ❗️❗️❗️\n\nClone the repo:\n`git clone https:\u002F\u002Fgithub.com\u002Fadvimman\u002Flama.git`\n\nThere are three options of an environment:\n\n1. Python virtualenv:\n\n    ```\n    virtualenv inpenv --python=\u002Fusr\u002Fbin\u002Fpython3\n    source inpenv\u002Fbin\u002Factivate\n    pip install torch==1.8.0 torchvision==0.9.0\n    \n    cd lama\n    pip install -r requirements.txt \n    ```\n\n2. Conda\n    \n    ```\n    % Install conda for Linux, for other OS download miniconda at https:\u002F\u002Fdocs.conda.io\u002Fen\u002Flatest\u002Fminiconda.html\n    wget https:\u002F\u002Frepo.anaconda.com\u002Fminiconda\u002FMiniconda3-latest-Linux-x86_64.sh\n    bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME\u002Fminiconda\n    $HOME\u002Fminiconda\u002Fbin\u002Fconda init bash\n\n    cd lama\n    conda env create -f conda_env.yml\n    conda activate lama\n    conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch -y\n    pip install pytorch-lightning==1.2.9\n    ```\n \n3. Docker: No actions are needed 🎉.\n\n# Inference \u003Ca name=\"prediction\">\u003C\u002Fa>\n\nRun\n```\ncd lama\nexport TORCH_HOME=$(pwd) && export PYTHONPATH=$(pwd)\n```\n\n**1. Download pre-trained models**\n\nThe best model (Places2, Places Challenge):\n    \n```    \ncurl -LJO https:\u002F\u002Fhuggingface.co\u002Fsmartywu\u002Fbig-lama\u002Fresolve\u002Fmain\u002Fbig-lama.zip\nunzip big-lama.zip\n```\n\nAll models (Places & CelebA-HQ):\n\n```\ndownload [https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F1B2x7eQDgecTL0oh3LSIBDGj0fTxs6Ips?usp=drive_link]\nunzip lama-models.zip\n```\n\n**2. Prepare images and masks**\n\nDownload test images:\n\n```\nunzip LaMa_test_images.zip\n```\n\u003Cdetails>\n \u003Csummary>OR prepare your data:\u003C\u002Fsummary>\n1) Create masks named as `[images_name]_maskXXX[image_suffix]`, put images and masks in the same folder. \n\n- You can use the [script](https:\u002F\u002Fgithub.com\u002Fadvimman\u002Flama\u002Fblob\u002Fmain\u002Fbin\u002Fgen_mask_dataset.py) for random masks generation. \n- Check the format of the files:\n    ```    \n    image1_mask001.png\n    image1.png\n    image2_mask001.png\n    image2.png\n    ```\n\n2) Specify `image_suffix`, e.g. `.png` or `.jpg` or `_input.jpg` in `configs\u002Fprediction\u002Fdefault.yaml`.\n\n\u003C\u002Fdetails>\n\n\n**3. Predict**\n\nOn the host machine:\n\n    python3 bin\u002Fpredict.py model.path=$(pwd)\u002Fbig-lama indir=$(pwd)\u002FLaMa_test_images outdir=$(pwd)\u002Foutput\n\n**OR** in the docker\n  \nThe following command will pull the docker image from Docker Hub and execute the prediction script\n```\nbash docker\u002F2_predict.sh $(pwd)\u002Fbig-lama $(pwd)\u002FLaMa_test_images $(pwd)\u002Foutput device=cpu\n```\nDocker cuda:\n```\nbash docker\u002F2_predict_with_gpu.sh $(pwd)\u002Fbig-lama $(pwd)\u002FLaMa_test_images $(pwd)\u002Foutput\n```\n\n**4. Predict with Refinement**\n\nOn the host machine:\n\n    python3 bin\u002Fpredict.py refine=True model.path=$(pwd)\u002Fbig-lama indir=$(pwd)\u002FLaMa_test_images outdir=$(pwd)\u002Foutput\n\n# Train and Eval\n\nMake sure you run:\n\n```\ncd lama\nexport TORCH_HOME=$(pwd) && export PYTHONPATH=$(pwd)\n```\n\nThen download models for _perceptual loss_:\n\n    mkdir -p ade20k\u002Fade20k-resnet50dilated-ppm_deepsup\u002F\n    wget -P ade20k\u002Fade20k-resnet50dilated-ppm_deepsup\u002F http:\u002F\u002Fsceneparsing.csail.mit.edu\u002Fmodel\u002Fpytorch\u002Fade20k-resnet50dilated-ppm_deepsup\u002Fencoder_epoch_20.pth\n\n\n## Places\n\n⚠️ NB: FID\u002FSSIM\u002FLPIPS metric values for Places that we see in LaMa paper are computed on 30000 images that we produce in evaluation section below.\nFor more details on evaluation data check [[Section 3. Dataset splits in Supplementary](https:\u002F\u002Fashukha.com\u002Fprojects\u002Flama_21\u002Flama_supmat_2021.pdf#subsection.3.1)]  ⚠️\n\nOn the host machine:\n\n    # Download data from http:\u002F\u002Fplaces2.csail.mit.edu\u002Fdownload.html\n    # Places365-Standard: Train(105GB)\u002FTest(19GB)\u002FVal(2.1GB) from High-resolution images section\n    wget http:\u002F\u002Fdata.csail.mit.edu\u002Fplaces\u002Fplaces365\u002Ftrain_large_places365standard.tar\n    wget http:\u002F\u002Fdata.csail.mit.edu\u002Fplaces\u002Fplaces365\u002Fval_large.tar\n    wget http:\u002F\u002Fdata.csail.mit.edu\u002Fplaces\u002Fplaces365\u002Ftest_large.tar\n\n    # Unpack train\u002Ftest\u002Fval data and create .yaml config for it\n    bash fetch_data\u002Fplaces_standard_train_prepare.sh\n    bash fetch_data\u002Fplaces_standard_test_val_prepare.sh\n    \n    # Sample images for test and viz at the end of epoch\n    bash fetch_data\u002Fplaces_standard_test_val_sample.sh\n    bash fetch_data\u002Fplaces_standard_test_val_gen_masks.sh\n\n    # Run training\n    python3 bin\u002Ftrain.py -cn lama-fourier location=places_standard\n\n    # To evaluate trained model and report metrics as in our paper\n    # we need to sample previously unseen 30k images and generate masks for them\n    bash fetch_data\u002Fplaces_standard_evaluation_prepare_data.sh\n    \n    # Infer model on thick\u002Fthin\u002Fmedium masks in 256 and 512 and run evaluation \n    # like this:\n    python3 bin\u002Fpredict.py \\\n    model.path=$(pwd)\u002Fexperiments\u002F\u003Cuser>_\u003Cdate:time>_lama-fourier_\u002F \\\n    indir=$(pwd)\u002Fplaces_standard_dataset\u002Fevaluation\u002Frandom_thick_512\u002F \\\n    outdir=$(pwd)\u002Finference\u002Frandom_thick_512 model.checkpoint=last.ckpt\n\n    python3 bin\u002Fevaluate_predicts.py \\\n    $(pwd)\u002Fconfigs\u002Feval2_gpu.yaml \\\n    $(pwd)\u002Fplaces_standard_dataset\u002Fevaluation\u002Frandom_thick_512\u002F \\\n    $(pwd)\u002Finference\u002Frandom_thick_512 \\\n    $(pwd)\u002Finference\u002Frandom_thick_512_metrics.csv\n\n    \n    \nDocker: TODO\n    \n## CelebA\nOn the host machine:\n\n    # Make shure you are in lama folder\n    cd lama\n    export TORCH_HOME=$(pwd) && export PYTHONPATH=$(pwd)\n\n    # Download CelebA-HQ dataset\n    # Download data256x256.zip from https:\u002F\u002Fdrive.google.com\u002Fdrive\u002Ffolders\u002F11Vz0fqHS2rXDb5pprgTjpD7S2BAJhi1P\n    \n    # unzip & split into train\u002Ftest\u002Fvisualization & create config for it\n    bash fetch_data\u002Fcelebahq_dataset_prepare.sh\n\n    # generate masks for test and visual_test at the end of epoch\n    bash fetch_data\u002Fcelebahq_gen_masks.sh\n\n    # Run training\n    python3 bin\u002Ftrain.py -cn lama-fourier-celeba data.batch_size=10\n\n    # Infer model on thick\u002Fthin\u002Fmedium masks in 256 and run evaluation \n    # like this:\n    python3 bin\u002Fpredict.py \\\n    model.path=$(pwd)\u002Fexperiments\u002F\u003Cuser>_\u003Cdate:time>_lama-fourier-celeba_\u002F \\\n    indir=$(pwd)\u002Fceleba-hq-dataset\u002Fvisual_test_256\u002Frandom_thick_256\u002F \\\n    outdir=$(pwd)\u002Finference\u002Fceleba_random_thick_256 model.checkpoint=last.ckpt\n    \n    \nDocker: TODO\n\n## Places Challenge \n\nOn the host machine:\n\n    # This script downloads multiple .tar files in parallel and unpacks them\n    # Places365-Challenge: Train(476GB) from High-resolution images (to train Big-Lama) \n    bash places_challenge_train_download.sh\n    \n    TODO: prepare\n    TODO: train \n    TODO: eval\n      \nDocker: TODO\n\n## Create your data\n\nPlease check bash scripts for data preparation and mask generation from CelebaHQ section,\nif you stuck at one of the following steps.\n\n\nOn the host machine:\n\n    # Make shure you are in lama folder\n    cd lama\n    export TORCH_HOME=$(pwd) && export PYTHONPATH=$(pwd)\n\n    # You need to prepare following image folders:\n    $ ls my_dataset\n    train\n    val_source # 2000 or more images\n    visual_test_source # 100 or more images\n    eval_source # 2000 or more images\n\n    # LaMa generates random masks for the train data on the flight,\n    # but needs fixed masks for test and visual_test for consistency of evaluation.\n\n    # Suppose, we want to evaluate and pick best models \n    # on 512x512 val dataset  with thick\u002Fthin\u002Fmedium masks \n    # And your images have .jpg extention:\n\n    python3 bin\u002Fgen_mask_dataset.py \\\n    $(pwd)\u002Fconfigs\u002Fdata_gen\u002Frandom_\u003Csize>_512.yaml \\ # thick, thin, medium\n    my_dataset\u002Fval_source\u002F \\\n    my_dataset\u002Fval\u002Frandom_\u003Csize>_512.yaml \\# thick, thin, medium\n    --ext jpg\n\n    # So the mask generator will: \n    # 1. resize and crop val images and save them as .png\n    # 2. generate masks\n    \n    ls my_dataset\u002Fval\u002Frandom_medium_512\u002F\n    image1_crop000_mask000.png\n    image1_crop000.png\n    image2_crop000_mask000.png\n    image2_crop000.png\n    ...\n\n    # Generate thick, thin, medium masks for visual_test folder:\n\n    python3 bin\u002Fgen_mask_dataset.py \\\n    $(pwd)\u002Fconfigs\u002Fdata_gen\u002Frandom_\u003Csize>_512.yaml \\  #thick, thin, medium\n    my_dataset\u002Fvisual_test_source\u002F \\\n    my_dataset\u002Fvisual_test\u002Frandom_\u003Csize>_512\u002F \\ #thick, thin, medium\n    --ext jpg\n    \n\n    ls my_dataset\u002Fvisual_test\u002Frandom_thick_512\u002F\n    image1_crop000_mask000.png\n    image1_crop000.png\n    image2_crop000_mask000.png\n    image2_crop000.png\n    ...\n\n    # Same process for eval_source image folder:\n    \n    python3 bin\u002Fgen_mask_dataset.py \\\n    $(pwd)\u002Fconfigs\u002Fdata_gen\u002Frandom_\u003Csize>_512.yaml \\  #thick, thin, medium\n    my_dataset\u002Feval_source\u002F \\\n    my_dataset\u002Feval\u002Frandom_\u003Csize>_512\u002F \\ #thick, thin, medium\n    --ext jpg\n    \n\n\n    # Generate location config file which locate these folders:\n    \n    touch my_dataset.yaml\n    echo \"data_root_dir: $(pwd)\u002Fmy_dataset\u002F\" >> my_dataset.yaml\n    echo \"out_root_dir: $(pwd)\u002Fexperiments\u002F\" >> my_dataset.yaml\n    echo \"tb_dir: $(pwd)\u002Ftb_logs\u002F\" >> my_dataset.yaml\n    mv my_dataset.yaml ${PWD}\u002Fconfigs\u002Ftraining\u002Flocation\u002F\n\n\n    # Check data config for consistency with my_dataset folder structure:\n    $ cat ${PWD}\u002Fconfigs\u002Ftraining\u002Fdata\u002Fabl-04-256-mh-dist\n    ...\n    train:\n      indir: ${location.data_root_dir}\u002Ftrain\n      ...\n    val:\n      indir: ${location.data_root_dir}\u002Fval\n      img_suffix: .png\n    visual_test:\n      indir: ${location.data_root_dir}\u002Fvisual_test\n      img_suffix: .png\n\n\n    # Run training\n    python3 bin\u002Ftrain.py -cn lama-fourier location=my_dataset data.batch_size=10\n\n    # Evaluation: LaMa training procedure picks best few models according to \n    # scores on my_dataset\u002Fval\u002F \n\n    # To evaluate one of your best models (i.e. at epoch=32) \n    # on previously unseen my_dataset\u002Feval do the following \n    # for thin, thick and medium:\n\n    # infer:\n    python3 bin\u002Fpredict.py \\\n    model.path=$(pwd)\u002Fexperiments\u002F\u003Cuser>_\u003Cdate:time>_lama-fourier_\u002F \\\n    indir=$(pwd)\u002Fmy_dataset\u002Feval\u002Frandom_\u003Csize>_512\u002F \\\n    outdir=$(pwd)\u002Finference\u002Fmy_dataset\u002Frandom_\u003Csize>_512 \\\n    model.checkpoint=epoch32.ckpt\n\n    # metrics calculation:\n    python3 bin\u002Fevaluate_predicts.py \\\n    $(pwd)\u002Fconfigs\u002Feval2_gpu.yaml \\\n    $(pwd)\u002Fmy_dataset\u002Feval\u002Frandom_\u003Csize>_512\u002F \\\n    $(pwd)\u002Finference\u002Fmy_dataset\u002Frandom_\u003Csize>_512 \\\n    $(pwd)\u002Finference\u002Fmy_dataset\u002Frandom_\u003Csize>_512_metrics.csv\n\n    \n**OR** in the docker:\n\n    TODO: train\n    TODO: eval\n    \n# Hints\n\n### Generate different kinds of masks\nThe following command will execute a script that generates random masks.\n\n    bash docker\u002F1_generate_masks_from_raw_images.sh \\\n        configs\u002Fdata_gen\u002Frandom_medium_512.yaml \\\n        \u002Fdirectory_with_input_images \\\n        \u002Fdirectory_where_to_store_images_and_masks \\\n        --ext png\n\nThe test data generation command stores images in the format,\nwhich is suitable for [prediction](#prediction).\n\nThe table below describes which configs we used to generate different test sets from the paper.\nNote that we *do not fix a random seed*, so the results will be slightly different each time.\n\n|        | Places 512x512         | CelebA 256x256         |\n|--------|------------------------|------------------------|\n| Narrow | random_thin_512.yaml   | random_thin_256.yaml   |\n| Medium | random_medium_512.yaml | random_medium_256.yaml |\n| Wide   | random_thick_512.yaml  | random_thick_256.yaml  |\n\nFeel free to change the config path (argument #1) to any other config in `configs\u002Fdata_gen` \nor adjust config files themselves.\n\n### Override parameters in configs\nAlso you can override parameters in config like this:\n\n    python3 bin\u002Ftrain.py -cn \u003Cconfig> data.batch_size=10 run_title=my-title\n\nWhere .yaml file extension is omitted\n\n### Models options \nConfig names for models from paper (substitude into the training command): \n\n    * big-lama\n    * big-lama-regular\n    * lama-fourier\n    * lama-regular\n    * lama_small_train_masks\n\nWhich are seated in configs\u002Ftraining\u002Ffolder\n\n### Links\n- All the data (models, test images, etc.) https:\u002F\u002Fdisk.yandex.ru\u002Fd\u002FAmdeG-bIjmvSug\n- Test images from the paper https:\u002F\u002Fdisk.yandex.ru\u002Fd\u002FxKQJZeVRk5vLlQ\n- The pre-trained models https:\u002F\u002Fdisk.yandex.ru\u002Fd\u002FEgqaSnLohjuzAg\n- The models for perceptual loss https:\u002F\u002Fdisk.yandex.ru\u002Fd\u002FncVmQlmT_kTemQ\n- Our training logs are available at https:\u002F\u002Fdisk.yandex.ru\u002Fd\u002F9Bt1wNSDS4jDkQ\n\n\n### Training time & resources\n\nTODO\n\n## Acknowledgments\n\n* Segmentation code and models if form [CSAILVision](https:\u002F\u002Fgithub.com\u002FCSAILVision\u002Fsemantic-segmentation-pytorch).\n* LPIPS metric is from [richzhang](https:\u002F\u002Fgithub.com\u002Frichzhang\u002FPerceptualSimilarity)\n* SSIM is from [Po-Hsun-Su](https:\u002F\u002Fgithub.com\u002FPo-Hsun-Su\u002Fpytorch-ssim)\n* FID is from [mseitzer](https:\u002F\u002Fgithub.com\u002Fmseitzer\u002Fpytorch-fid)\n\n## Citation\nIf you found this code helpful, please consider citing: \n```\n@article{suvorov2021resolution,\n  title={Resolution-robust Large Mask Inpainting with Fourier Convolutions},\n  author={Suvorov, Roman and Logacheva, Elizaveta and Mashikhin, Anton and Remizova, Anastasia and Ashukha, Arsenii and Silvestrov, Aleksei and Kong, Naejin and Goka, Harshith and Park, Kiwoong and Lempitsky, Victor},\n  journal={arXiv preprint arXiv:2109.07161},\n  year={2021}\n}\n```\n","LaMa 是一个用于图像修复的项目，特别擅长处理大尺寸遮罩区域。它利用傅里叶卷积技术，在训练过程中仅使用256x256分辨率的图像，但能够很好地泛化到高达2048像素的高分辨率图像，并且在复杂场景下也能保持出色性能，如周期性结构的补全。基于PyTorch框架开发，支持通过Google Colab轻松上手。该项目非常适合需要高质量图像修复的应用场景，例如照片编辑、影视后期制作等。此外，LaMa还促进了相关领域的进一步研究与应用开发。",2,"2026-06-11 03:24:21","top_topic"]