Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Segment-Object-Centric
Manage
Activity
Members
Labels
Plan
Issues
3
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexandre Chapin
Segment-Object-Centric
Commits
ac9dbb39
Commit
ac9dbb39
authored
2 years ago
by
Alexandre Chapin
Browse files
Options
Downloads
Patches
Plain Diff
Add SAM submodule
parent
bf7455df
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitmodules
+3
-0
3 additions, 0 deletions
.gitmodules
osrt/encoder.py
+2
-2
2 additions, 2 deletions
osrt/encoder.py
segment-anything
+1
-0
1 addition, 0 deletions
segment-anything
with
6 additions
and
2 deletions
.gitmodules
0 → 100644
+
3
−
0
View file @
ac9dbb39
[submodule "segment-anything"]
path = segment-anything
url = git@github.com:facebookresearch/segment-anything.git
This diff is collapsed.
Click to expand it.
osrt/encoder.py
+
2
−
2
View file @
ac9dbb39
...
@@ -93,7 +93,7 @@ class OSRTEncoder(nn.Module):
...
@@ -93,7 +93,7 @@ class OSRTEncoder(nn.Module):
return
slot_latents
return
slot_latents
class
FeatureMasking
(
nn
.
Module
):
class
FeatureMasking
(
nn
.
Module
):
def
__init__
(
self
,
pos_start_octave
=
0
,
num_slots
=
6
,
slot_dim
=
1536
,
slot_iters
=
1
,
sam_model
=
"
default
"
,
sam_path
=
"
sam_vit_h_4b8939.pth
"
,
def
__init__
(
self
,
pos_start_octave
=
0
,
num_slots
=
6
,
num_conv_blocks
=
3
,
num_att_blocks
=
5
,
slot_dim
=
1536
,
slot_iters
=
1
,
sam_model
=
"
default
"
,
sam_path
=
"
sam_vit_h_4b8939.pth
"
,
randomize_initial_slots
=
False
):
randomize_initial_slots
=
False
):
super
().
__init__
()
super
().
__init__
()
...
@@ -128,7 +128,7 @@ class FeatureMasking(nn.Module):
...
@@ -128,7 +128,7 @@ class FeatureMasking(nn.Module):
def
forward
(
self
,
images
,
camera_pos
,
rays
):
def
forward
(
self
,
images
,
camera_pos
,
rays
):
masks
=
self
.
mask_generator
.
generate
(
image
)
masks
=
self
.
mask_generator
.
generate
(
image
s
)
batch_size
,
num_images
=
images
.
shape
[:
2
]
batch_size
,
num_images
=
images
.
shape
[:
2
]
x
=
images
.
flatten
(
0
,
1
)
x
=
images
.
flatten
(
0
,
1
)
...
...
This diff is collapsed.
Click to expand it.
segment-anything
@
6fdee8f2
Subproject commit 6fdee8f2727f4506cfbbe553e23b895e27956588
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment