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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'RegSeg48' object has no attribute 'set_dataset_processing_params' #2017

Open
james-imi opened this issue Jun 10, 2024 · 1 comment

Comments

@james-imi
Copy link

馃挕 Your Question

Using

model_name = Models.REGSEG48
...

    image_processor = ComposeProcessing(
        [
            SegmentationResize((768, 1024)), 
            StandardizeImage(max_value=255.0),
            NormalizeImage(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225]),
            ImagePermute(permutation=(2, 0, 1)),
        ]
    )

    best_model = models.get(
        model_name=model_name,
        num_classes=5,
        checkpoint_path=os.path.join(
            trainer.checkpoints_dir_path, "ckpt_best.pth")
    ).cuda().eval()

    best_model.set_dataset_processing_params(
        class_names=['background', 'enamel', 'dentin', 'pulp', 'bones'],
        image_processor=image_processor
    )

Versions

No response

@james-imi
Copy link
Author

Same as STDC

TypeError: cross_entropy_loss(): argument 'input' (position 1) must be Tensor, not tuple

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

No branches or pull requests

1 participant