The calflops is designed to calculate FLOPs、MACs and Parameters in all various neural networks, such as Linear、 CNN、 RNN、 GCN、Transformer(Bert、LlaMA etc Large Language Model)
SAM model requires multiple inputs, image, point_prompt or boxes_prompt, how do you pass these parameters to the calculate_flops?For example, in the following code, how to set parameters?
from mobile_sam import MobileSAM, SamPredictor
import torch
model = MobileSAM.from_pretrained("nielsr/mobilesam")
# perform inference
device = "cuda" if torch.cuda.is_available() else "cpu"
model.to(device=device)
predictor = SamPredictor(model)
predictor.set_image(<your_image>)
masks, _, _ = predictor.predict(<input_prompts>)
SAM model requires multiple inputs, image, point_prompt or boxes_prompt, how do you pass these parameters to the calculate_flops?For example, in the following code, how to set parameters?