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 SemanticSam3dLogger #643

Merged
merged 11 commits into from
Jun 28, 2024
Merged

Add SemanticSam3dLogger #643

merged 11 commits into from
Jun 28, 2024

Conversation

anwai98
Copy link
Contributor

@anwai98 anwai98 commented Jun 27, 2024

No description provided.

Copy link
Contributor

@constantinpape constantinpape left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through this again and found a few more small points. Once this is addressed we can merge this.

model_type="vit_b",
checkpoint_path=None,
):
_, sam = get_sam_model(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just pass the checkpoint here? Then we don't need to duplicate the code below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that won't work as we need to pass the weights to the wrapper model (to initialize the adapter blocks)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I don't fully understand. Let's discuss tomorrow :) .

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay now I see already where your suspicion comes from.

TLDR: I think we might have to merge the get_3d_sam_model into get_sam_model for the best possible design (which leads to flexibly loading SAM checkpoints for finetuning, and the 3d-SAM checkpoints for downstream semantic inference).

I have a plan on this. I'll take care of this first thing in the morning. Thanks for spotting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current design should work at least for intialization. We can revisit this later to discuss how we do this for actually loading the trained 3d models.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okie, I'll leave it to here for now then. Thanks!

micro_sam/sam_3d_wrapper.py Outdated Show resolved Hide resolved
micro_sam/training/semantic_sam_trainer.py Outdated Show resolved Hide resolved
micro_sam/training/semantic_sam_trainer.py Show resolved Hide resolved
micro_sam/training/semantic_sam_trainer.py Outdated Show resolved Hide resolved
@anwai98 anwai98 marked this pull request as ready for review June 27, 2024 15:43
micro_sam/training/semantic_sam_trainer.py Outdated Show resolved Hide resolved
model_type="vit_b",
checkpoint_path=None,
):
_, sam = get_sam_model(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I don't fully understand. Let's discuss tomorrow :) .

@constantinpape constantinpape merged commit 28c97e4 into dev Jun 28, 2024
0 of 3 checks passed
@constantinpape constantinpape deleted the add-semanticsam3d-logger branch June 28, 2024 10:19
lufre1 pushed a commit that referenced this pull request Jul 4, 2024
Updates to SAM 3d training

---------

Co-authored-by: Constantin Pape <constantin.pape@informatik.uni-goettingen.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants