visualisation of the product of segment-anything
use the script amg.py in the directory scripts on this image :
You will have this result with the masked images ( black /white ) in the directory :
to install maskimg , you need pip install python-opencv jinja2 numpy
#use maskimg.py:
usage: maskimg.py [-h] [-f INPUTFILE] [-d INPUTDIR] [-o OUTPUT]
Script for processing input files and directories
options:
-h, --help show this help message and exit
-f INPUTFILE, --inputfile INPUTFILE
Input file path
-d INPUTDIR, --inputdir INPUTDIR
Input directory path
-o OUTPUT, --output OUTPUT
Output path
The maskimg.py will give you this result in the output directory:
In the directory , a index.html will be created , so launch a http server IN THE DIRECTORY : python3 -m http.server 9000