Giter Club home page Giter Club logo

Comments (7)

yformer avatar yformer commented on August 11, 2024

@yihong1120, thanks for your interest in EfficientSAM!

Can you give some detailed information on the hardware platform for your use case, e.g, memory constraints, latency constraints, and CPU type?

from efficientsam.

WanBenLe avatar WanBenLe commented on August 11, 2024

When I download to model and export to A40 GPU, seems to use 35Gb GPU memory and sam without prompt, use over than 20s.
Maybe it's too slow to use.

from efficientsam.

yformer avatar yformer commented on August 11, 2024

@WanBenLe, can you kill all the jobs you are running to check?

from efficientsam.

WanBenLe avatar WanBenLe commented on August 11, 2024

I used it:
efficient_sam_vits_model = build_efficient_sam_vits()
efficient_sam_vits_model.to('cuda:3')

In def predict_masks, take_along_dim will lead to out of GPU memory.
iou_predictions = torch.take_along_dim(iou_predictions, sorted_ids, dim=2)

So I have to
output_masks=output_masks.to('cpu')
iou_predictions=iou_predictions.to('cpu')

I also use cuda to run in batched_nms process_small_region.
masks = torch.cat(new_masks, dim=0).to('cuda:3')
boxes = batched_mask_to_box(masks)
keep_by_nms = batched_nms(
boxes.float(),
torch.as_tensor(scores).to('cuda:3'),
torch.zeros_like(boxes[:, 0]).to('cuda:3'), # categories
iou_threshold=nms_thresh,
)

33gb GPU Mem of model.
41gb GPU Mem of model + batched_nms.

Maybe I had something wrong?

from efficientsam.

yformer avatar yformer commented on August 11, 2024

@WanBenLe What is the input for your case?

from efficientsam.

WanBenLe avatar WanBenLe commented on August 11, 2024

@yformer
Image, which resize 512*512

with zipfile.ZipFile("weights/efficient_sam_vits.pt.zip", 'r') as zip_ref:
zip_ref.extractall("weights")
efficient_sam_vits_model = build_efficient_sam_vits()
efficient_sam_vits_model.to('cuda:2')
efficient_sam_vits_model.device
rle = run_everything_ours(cv2.resize(image,(512,512)), efficient_sam_vits_model)

from efficientsam.

xiaoqiang-lu avatar xiaoqiang-lu commented on August 11, 2024

Me too, OOM occured using v100-32G.

from efficientsam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.