Giter VIP home page Giter VIP logo

Comments (5)

HongliXiao avatar HongliXiao commented on June 29, 2024

同样地,我在运行demo.ipynb的“Generate Results for the Whole Video”这一部分代码时,也遇到了同样的问题:

Output exceeds the size limit. Open the full output data in a text editor---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[15], line 52
50 segtracker.add_reference(frame, pred_mask)
51 else:
---> 52 pred_mask = segtracker.track(frame,update_memory=True)
53 torch.cuda.empty_cache()
54 gc.collect()

File /media/alienware/新加卷1/Research/Segment-and-Track-Anything-main/SegTracker.py:75, in SegTracker.track(self, frame, update_memory)
67 def track(self,frame,update_memory=False):
68 '''
69 Track all known objects.
70 Arguments:
(...)
73 merged_mask: numpy array (h,w)
74 '''
---> 75 pred_mask = self.tracker.track(frame)
76 if update_memory:
77 self.tracker.update_memory(pred_mask)

File ~/anaconda3/envs/SAMTrack/lib/python3.9/site-packages/torch/autograd/grad_mode.py:28, in _DecoratorContextManager.call..decorate_context(*args, **kwargs)
25 @functools.wraps(func)
26 def decorate_context(*args, **kwargs):
27 with self.class():
...
579 dim=1).clamp(1e-5, 1 - 1e-5)
580 merged_logit = torch.logit(merged_prob)
582 return merged_logit

RuntimeError: CUDA out of memory. Tried to allocate 1.09 GiB (GPU 0; 7.78 GiB total capacity; 5.02 GiB already allocated; 182.88 MiB free; 5.21 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

from segment-and-track-anything.

yoxu515 avatar yoxu515 commented on June 29, 2024

Hi, what pytorch version do you use? We recommend pytorch >= 1.10. If yes, please check how many objects are tracked when you use the notebook. If the object number is large, you may try using a smaller points_per_side, e.g. 8 and a larger sam_gap, e.g. 30 for your video to control the object number.

from segment-and-track-anything.

HongliXiao avatar HongliXiao commented on June 29, 2024

感谢,我试着调整了一下这两个参数,可以多处理一些帧,但是仍旧无法;处理整个视频。我想问一下你们使用的显卡配置,看看能不能向老师申请换个好点的,谢谢!

from segment-and-track-anything.

yoxu515 avatar yoxu515 commented on June 29, 2024

We use RTX 3090 24G, but according to our observation, 10G may be sufficient to run a video with upto 200 objects. There may be two solutions,
1, downscale your video to a smaller size, e.g. 640x320 and I guess it can be processed on a 8G GPU card. We are considering to add a parameter for users to control the size.
2, switch to a new enviroment with higher pytorch version and try again. The memory management mechanism may be different in different versions.

from segment-and-track-anything.

HongliXiao avatar HongliXiao commented on June 29, 2024

witch to a new e

非常感谢!

from segment-and-track-anything.

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.