[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic-mask-generation pipeline for Segment Anything Model (SAM) #22840

Merged
merged 68 commits into from
Apr 20, 2023
Merged
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
eb4dc26
cleanup
ArthurZucker Apr 18, 2023
f3f345b
updates
ArthurZucker Apr 19, 2023
94fd59d
more refactoring
ArthurZucker Apr 19, 2023
6bbb106
make style
ArthurZucker Apr 19, 2023
52675a6
update inits
ArthurZucker Apr 19, 2023
3901d13
support other inputs in base
ArthurZucker Apr 19, 2023
df77716
update based on review
ArthurZucker Apr 19, 2023
9d9e70b
Update tests/pipelines/test_pipelines_automatic_mask_generation.py
ArthurZucker Apr 19, 2023
0a7f702
update
ArthurZucker Apr 19, 2023
d57ed60
fixup
ArthurZucker Apr 19, 2023
2d11d6f
TODO x and y to refactor, _h _w refactored here
ArthurZucker Apr 19, 2023
8950318
update docstring
ArthurZucker Apr 19, 2023
c68453a
more nits
ArthurZucker Apr 19, 2023
e8b45b3
style on these
ArthurZucker Apr 19, 2023
ef08e55
more doc fix
ArthurZucker Apr 19, 2023
d9027ed
rename variables
younesbelkada Apr 19, 2023
0e507b8
update
ArthurZucker Apr 19, 2023
3b6f918
Merge branch 'main' of https://github.com/huggingface/transformers in…
ArthurZucker Apr 19, 2023
7dbdbc6
updates
ArthurZucker Apr 19, 2023
23898c1
style
ArthurZucker Apr 19, 2023
cff3a38
update
ArthurZucker Apr 19, 2023
a2e1038
fix `_mask_to_rle_pytorch`
ArthurZucker Apr 20, 2023
a4aac94
styling
ArthurZucker Apr 20, 2023
05b04c8
fix ask to rle, wrong outputs
ArthurZucker Apr 20, 2023
e5a97df
add device arg
younesbelkada Apr 20, 2023
b1591e5
update
ArthurZucker Apr 20, 2023
deee7fe
Merge branch 'add-mg-pipeline' of https://github.com/ArthurZucker/tra…
ArthurZucker Apr 20, 2023
ad88b20
more updates, fix tets
ArthurZucker Apr 20, 2023
b8f5980
udpate
ArthurZucker Apr 20, 2023
796ec85
update docstrings
ArthurZucker Apr 20, 2023
a98eb36
styling
ArthurZucker Apr 20, 2023
093d37d
fixup
ArthurZucker Apr 20, 2023
f64b444
add notebook on the docs
younesbelkada Apr 20, 2023
4fd393d
update orginal sizes
ArthurZucker Apr 20, 2023
2dbe327
Merge branch 'add-mg-pipeline' of https://github.com/ArthurZucker/tra…
ArthurZucker Apr 20, 2023
4c0412d
fix docstring
younesbelkada Apr 20, 2023
395e08b
updat condition on point_per-batch
ArthurZucker Apr 20, 2023
54e797c
Merge branch 'add-mg-pipeline' of https://github.com/ArthurZucker/tra…
younesbelkada Apr 20, 2023
8f9f07c
updates tests
ArthurZucker Apr 20, 2023
83f6a84
fix CI test
younesbelkada Apr 20, 2023
c647a50
extend is required, append does not work!
ArthurZucker Apr 20, 2023
04a6cf2
Merge branch 'add-mg-pipeline' of https://github.com/ArthurZucker/tra…
ArthurZucker Apr 20, 2023
bca34eb
fixup
ArthurZucker Apr 20, 2023
e121428
fix CI tests
younesbelkada Apr 20, 2023
3664c01
whit pixels left
ArthurZucker Apr 20, 2023
983d0e1
address doc comments
younesbelkada Apr 20, 2023
7dcdd36
fix doc
younesbelkada Apr 20, 2023
75b9576
slow pipeline tests
ArthurZucker Apr 20, 2023
342109b
update auto init
ArthurZucker Apr 20, 2023
df58947
Merge branch 'add-mg-pipeline' of https://github.com/ArthurZucker/tra…
ArthurZucker Apr 20, 2023
b9e4272
add revision
younesbelkada Apr 20, 2023
749b94f
Merge branch 'add-mg-pipeline' of https://github.com/ArthurZucker/tra…
younesbelkada Apr 20, 2023
d5eb3f9
make fixup
younesbelkada Apr 20, 2023
e103ef2
update p!ipoeline tag when calling tests
ArthurZucker Apr 20, 2023
ed4e727
alphabeitcal order in inits
ArthurZucker Apr 20, 2023
3c4f4b8
fix copies
ArthurZucker Apr 20, 2023
eb9bd0c
last style nits
ArthurZucker Apr 20, 2023
d98f0e3
Merge branch 'add-mg-pipeline' of https://github.com/ArthurZucker/tra…
ArthurZucker Apr 20, 2023
7a1f99a
Apply suggestions from code review
younesbelkada Apr 20, 2023
94a7af3
reformat docstring
younesbelkada Apr 20, 2023
7d8b860
more reformat
younesbelkada Apr 20, 2023
a59133a
address most of the comments
younesbelkada Apr 20, 2023
e970f30
Update src/transformers/pipelines/mask_generation.py
younesbelkada Apr 20, 2023
b5d56da
final refactor
younesbelkada Apr 20, 2023
32d6e80
Update src/transformers/models/sam/image_processing_sam.py
younesbelkada Apr 20, 2023
4149f36
fixup and fix slow tests
younesbelkada Apr 20, 2023
9a0c19d
Merge remote-tracking branch 'upstream/main' into HEAD
younesbelkada Apr 20, 2023
3b4a594
revert
younesbelkada Apr 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
last style nits
  • Loading branch information
ArthurZucker committed Apr 20, 2023
commit eb9bd0c344754f1e18a8cb806df3857549be6f8b
2 changes: 1 addition & 1 deletion tests/pipelines/test_pipelines_mask_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_small_model_tf(self):
@slow
@require_torch
def test_small_model_pt(self):
image_segmenter = pipeline("mask-generation",model="facebook/sam-vit-huge")
image_segmenter = pipeline("mask-generation", model="facebook/sam-vit-huge")

outputs = image_segmenter("http://images.cocodataset.org/val2017/000000039769.jpg", points_per_batch=256)

Expand Down