super-gradients
super-gradients copied to clipboard
AttributeError: 'RegSeg48' object has no attribute 'set_dataset_processing_params'
💡 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
Same as STDC
TypeError: cross_entropy_loss(): argument 'input' (position 1) must be Tensor, not tuple