Skip to content
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

Kernel crashes and Segmentation fault (core dumped) #755

Open
dadaaichifan opened this issue May 28, 2024 · 3 comments
Open

Kernel crashes and Segmentation fault (core dumped) #755

dadaaichifan opened this issue May 28, 2024 · 3 comments

Comments

@dadaaichifan
Copy link

When I run antomatic_mask_generator_example.ipynb, the kernel crashed
QQ截图20240528170713
When I run the command line in the terminal , will appear Segmentation fault (core dumped)

image

I think these two problems are the same kind of problem, this problem has been bothering me all day, could you please point out the problem, thank you.

@timonpalm
Copy link

Facing the same issue :/

@timonpalm
Copy link

timonpalm commented Oct 8, 2024

In my case, it works sometimes. I figured out that it happens when I run specifically this code

sam = sam_model_registry[model_type](checkpoint=sam_checkpoint)

mask_generator = SamAutomaticMaskGenerator(model=sam)

masks = mask_generator.generate(image)

or

predictor.set_image(image)

The error even persists when I run it with smaller images, it runs a bit more reliable though.
Restarting the kernel does not help, also restarting vscode is not a remedy. Furthermore, creating a new environment with a fresh installation of SAM either via git or pip also did not solve the problem

The only that that helped so far, was to reboot the system. Then, I was able to run the aforementioned cells a few times before it crashes again.

I suppose it has to be some kind of memory error/ garbage collection, that the memory of these computation are not being emptied after run and it thus overflows.

@dadaaichifan
Copy link
Author

就我而言,它有时有效。我发现,当我专门运行此代码时,会发生这种情况

sam = sam_model_registry[model_type](checkpoint=sam_checkpoint)

mask_generator = SamAutomaticMaskGenerator(model=sam)

masks = mask_generator.generate(image)

predictor.set_image(image)

当我使用较小的图像运行它时,错误仍然存在,不过它运行得更可靠一些。重新启动内核没有帮助,重新启动 vscode 也不是一种补救措施。此外,通过 git 或 pip 使用全新安装的 SAM 创建新环境也无法解决问题

到目前为止,唯一有帮助的是重新启动系统。然后,我能够在它再次崩溃之前运行上述单元格几次。

我想这一定是某种内存错误/垃圾回收,这些计算的内存在运行后没有被清空,因此溢出

Do you have a more effective solution now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants