forked from baaivision/Painter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e1159c
commit e782492
Showing
24 changed files
with
1,052 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
output* | ||
*.pth | ||
**.pyc | ||
**/__pycache__/** | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
## **SegGPT Usage** | ||
- We release the [SegGPT model](https://huggingface.co/BAAI/SegGPT/blob/main/seggpt_vit_large.pth) and inference code for segmentation everything, as well as some example images and videos. | ||
### Installation | ||
``` | ||
git clone https://github.com/baaivision/Painter | ||
cd Painter/SegGPT/SegGPT_inference && wget https://huggingface.co/BAAI/SegGPT/blob/main/seggpt_vit_large.pth | ||
pip install -r requirements.txt | ||
``` | ||
### Usage | ||
Everything in an image with a prompt. | ||
``` | ||
python seggpt_inference.py \ | ||
--input_image examples/hmbb_2.jpg \ | ||
--prompt_image examples/hmbb_1.jpg \ | ||
--prompt_target examples/hmbb_1_target.png \ | ||
--output_dir ./ | ||
``` | ||
|
||
Everything in an image with multiple prompts. | ||
``` | ||
python seggpt_inference.py \ | ||
--input_image examples/hmbb_3.jpg \ | ||
--prompt_image examples/hmbb_1.jpg examples/hmbb_2.jpg \ | ||
--prompt_target examples/hmbb_1_target.png examples/hmbb_2_target.png \ | ||
--output_dir ./ | ||
``` | ||
|
||
Everything in a video using a prompt image. | ||
``` | ||
python seggpt_inference.py \ | ||
--input_video examples/video_1.mp4 \ | ||
--prompt_image examples/video_1.jpg \ | ||
--prompt_target examples/video_1_target.png \ | ||
--output_dir ./ | ||
``` | ||
|
||
Everything in a video using the first frame as the prompt. | ||
``` | ||
python seggpt_inference.py \ | ||
--input_video examples/video_1.mp4 \ | ||
--prompt_target examples/video_1_target.png \ | ||
--output_dir ./ | ||
``` | ||
|
||
Processing a long video with prompts from both a target image and the predictions of the previous NUM_FRAMES frames. | ||
``` | ||
NUM_FRAMES=4 | ||
python seggpt_inference.py \ | ||
--input_video examples/video_3.mp4 \ | ||
--prompt_target examples/video_3_target.png \ | ||
--num_frames $NUM_FRAMES \ | ||
--output_dir ./ | ||
``` | ||
|
||
<!-- <div align="center"> | ||
<image src="rainbow.gif" width="720px" /> | ||
</div> --> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.