Kernel crashes and Segmentation fault (core dumped)
When I run antomatic_mask_generator_example.ipynb, the kernel crashed
When I run the command line in the terminal , will appear Segmentation fault (core dumped)
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.
Facing the same issue :/
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.
就我而言,它有时有效。我发现,当我专门运行此代码时,会发生这种情况
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