-
Notifications
You must be signed in to change notification settings - Fork 40
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
Suggestions for regression-based 3D attention #18
Comments
@sgbaird Did you get anything? I am looking for regression for Video input (Batch_size, time_frames, Height, Width, Channels). |
@ravikiranrao not yet, I think we're going to try a fully connected neural network to change the shape to 2D (and use PyTorch's built-in), but if we find something I'll try to remember to post back here. |
Hi, sorry for the late answer. M3D-Cam is designed for segmentation and classification, but it should also be adaptable to regression. Maybe it works out-of-the-box, but I have not tested that. However, you probably need to adapt some parts of the postprocessing in medcam_inject.py. # Import M3d-CAM
from medcam import medcam
# Init your model and dataloader
model = MyCNN()
data_loader = DataLoader(dataset, batch_size=1, shuffle=False)
# Inject model with M3d-CAM
model = medcam.inject(model, output_dir="attention_maps", save_maps=True)
# Continue to do what you're doing...
# In this case inference on some new data
model.eval()
for batch in data_loader:
# Every time forward is called, attention maps will be generated and saved in the directory "attention_maps"
output = model(batch)
# more of your code... Best |
Any alternative codebases that might help out with regression? (instead of classification/segmentation).
The text was updated successfully, but these errors were encountered: