Comments (11)
When I needed to quickly draw a mask, I used GIMP several times - just load an image, create another transparent layer, draw a mask there and save it to a separate file. Note that all masks must be strictly binary before feeding them to LaMa - thus if you make them with GIMP, you need a separate binarization step (that's pretty easy to do with cv2 and plain numpy).
from lama.
I'm not sure that I understand the question right... For better quality, the mask should cover an object and maybe a bit more - even tiny unmasked parts may result in artifacts. However, mask must not follow object boundaries - LaMa does not depend on its shape - it sees only unmasked areas and tries to regenerate the image based only on the available information. LaMa does not refine mask shape in any way. Does this answer your question? If not, could you please clarify it?
from lama.
Hi! Could you please describe your problem in more detail? What link is broken?
If you have an environment set up, you can use script
bin/gen_mask_dataset.py configs/data_gen/<config_name>.yaml \
<dir with input images> <where to store image crops and masks>
Alternatively, there is a convenience wrapper via docker - please refer to the readme.
from lama.
Thank you for the help! Is there also an option to draw the mask on top of the image, like the one which is used in Google Colab demo?
from lama.
No, we do not provide any UI except those in Colab.
from lama.
You can try third-party apps, e.g. lama-cleaner.
from lama.
Thank you so much for the help and advice! Much appreciated :)
from lama.
@windj007 just another small query related to masks. As it can be seen in the Colab demo and lama-cleaner implementation, does the original LaMa repository also have the ability to recognize and stick with the main features in the original image even if the created mask does not perfectly align? If so, can you please point me towards the script which is performing this function?
from lama.
Note about mask binarization: predict.py
actually does binarization - I forgot about this line. But anyway, as stated in another issue, having smooth masks is meaningless and it's better to control it manually.
from lama.
My apologies for not being able to ask the question clearly. But you have answered quite elaborately and my confusion is clear now. Thank you for the clarification!
from lama.
You're welcome!
from lama.
Related Issues (20)
- A simple ckpt to pt model convertor
- Repeated Refinement?
- Error finetuning the big-lama-with-discr model HOT 7
- Data set training problem HOT 1
- After executing the training command, it has been stuck at this point without any progress in the training. HOT 1
- Inpaint a NEW thing? HOT 3
- Refinement with Multiple Images
- How to draw a loss function curve
- Dataset is empty if configuring img_suffix: .jpg in default.yaml
- ONNX Model done HOT 11
- Output Error: No inpainted in the output_dir HOT 1
- Can't install at image in Docker
- The completion effect is not good? HOT 1
- Does Llama support inpainting a given image onto the original image as opposed to just removing from the original image
- Can't find dataloader , no outputs HOT 1
- Is there a way to find out the result is quality?
- nccl time out HOT 1
- Supplementary materials link does not work HOT 1
- Post-processing for LaMa Model Output to Increase Quality
- The link The link to download the CelebA-HQ dataset is not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lama.