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

642 train 3d model with lucchi data #650

Draft
wants to merge 26 commits into
base: dev
Choose a base branch
from

Conversation

lufre1
Copy link
Contributor

@lufre1 lufre1 commented Jul 4, 2024

No description provided.

@lufre1 lufre1 linked an issue Jul 4, 2024 that may be closed by this pull request
@lufre1 lufre1 changed the base branch from master to dev July 4, 2024 06:59
assert os.path.exists(image_path), image_path

# Perform segmentation only on the semantic class
for i, (semantic_class_name, _) in enumerate(semantic_class_map.items()):
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest to remove this part already, it doesn't make sense in the context here.

def predict(args):

device = "cuda" if torch.cuda.is_available() else "cpu"
if args.checkpoint_path is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure why you would ever run prediction without a checkpoint. I would not make this optional.

lora_rank=4,
model_type=args.model_type,
checkpoint_path=cp_path
)
Copy link
Contributor

Choose a reason for hiding this comment

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

This will not work to actually load the checkpoint. Please read the code I send you carefully and see how I use torch_em.util.load_model to get the checkpoint. Not that this quite complex way is now necessary because of the way how we mix the 3d adapter and LoRA. I will think about a better way at some point, but for now we need to use this work-around.

return raw


class LucchiSegmentationDataset(SegmentationDataset):
Copy link
Contributor

Choose a reason for hiding this comment

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

This can now be removed.

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.

train 3d model with lucchi data
3 participants