Training on custom dataset with custom mask for Inpainting #1270
-
Hello @lindahua @wwhio @tpoisonooo @hellock @innerlee Can you please guide me with step by step process on how we need to prepare a dataset for a custom image dataset with a custom mask (if possible)? How the masks will look like in the sense that whether it will be a colour image on which white patches (the part that will be inpainted from the model) is drawn or it will be a completely black image on which white patches (the part that will be inpainted from the model) is drawn? (in short how to prepare mask and then how to supply it for model training) I referred to your steps but couldn't completely follow them. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
During implementing your dataset, just give the information:
|
Beta Was this translation helpful? Give feedback.
-
Thank you for this guide,it help me a lot! |
Beta Was this translation helpful? Give feedback.
mmedit/datasets/__init__.py
, and add it to__all__
.mmedit/datasets/pipelines/__init__.py
, and add it to__all__
.During implementing your dataset, just give the information:
ImgInpaintingDataset
class, and implement yourload_annotations
function.__init__
function according to your need.load_annotations
: package all information you need for one paired data into adict
and append thesedict
s to alist
and return thislist
.