Я передаю большой массив (1143, 1252, 365)
в skimage.segmentation.slic
Это убивает ядро ноутбука Jupyter, поэтому я застрял с кодом в pycharm и получаю:
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
Я попробовал массивы (1143,1252, 100)
и повернул все данные 365, и это работает.
Я читал, что это ошибка сегментации, и ее можно отследить с помощью GDB, поэтому у меня есть обратный след от этого но это не очень помогло мне
Program received signal SIGSEGV, Segmentation fault.
0x00007fffce88f745 in ?? () from /xxxxxxxxxxpath-removedxxxxxxxxx/_slic.cpython-37m-x86_64-linux-gnu.so
#0 0x00007fffce88f745 in ?? () from /xxxxxxxxxxpath-removedxxxxxxxxx/python/lib/python3.7/site-packages/skimage/segmentation/_slic.cpython-37m-x86_64-linux-gnu.so
#1 0x000000000043d587 in _PyMethodDef_RawFastCallKeywords (kwnames=0x0, nargs=0, args=0x8, self=0x0, method=0x7fffcea9f980) at Objects/call.c:694
#2 _PyCFunction_FastCallKeywords (func=0x7fffcf1c9eb0, args=args@entry=0x224ea80, nargs=nargs@entry=6, kwnames=kwnames@entry=0x0) at Objects/call.c:734
#3 0x0000000000429681 in call_function (kwnames=0x0, oparg=6, pp_stack=<synthetic pointer>) at Python/ceval.c:4568
#4 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3124
#5 0x00000000004ead18 in PyEval_EvalFrameEx (throwflag=0, f=0x224e800) at Python/ceval.c:547
#6 _PyEval_EvalCodeWithName (_co=0x7fffcf1c4b70, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=1, kwnames=0x7ffff7f16a68, kwargs=0x7fffcc562f08, kwcount=3,
kwstep=1, defs=0x7fffcf1b7728, defcount=11, kwdefs=0x0, closure=0x0, name=0x7ffff6e05130, qualname=0x7ffff6e05130) at Python/ceval.c:3930
#7 0x000000000043c9c6 in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:433
#8 0x000000000042880b in call_function (kwnames=0x7ffff7f16a50, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4616
#9 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3139
#10 0x0000000000420668 in function_code_fastcall (co=<optimized out>, args=<optimized out>, nargs=3, globals=<optimized out>) at Objects/call.c:283
#11 0x000000000043ca9f in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:415
#12 0x000000000042997c in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4616
#13 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3124
#14 0x0000000000420668 in function_code_fastcall (co=<optimized out>, args=<optimized out>, nargs=0, globals=<optimized out>) at Objects/call.c:283
#15 0x000000000043ca9f in _PyFunction_FastCallKeywords (func=<optimized out>, stack=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>) at Objects/call.c:415
#16 0x000000000042997c in call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>) at Python/ceval.c:4616
#17 _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3124
#18 0x00000000004ead18 in PyEval_EvalFrameEx (throwflag=0, f=0x7ffff7ee6450) at Python/ceval.c:547
#19 _PyEval_EvalCodeWithName (_co=_co@entry=0x7ffff6da3ed0, globals=globals@entry=0x7ffff7f65390, locals=locals@entry=0x7ffff6da3ed0, args=args@entry=0x0, argcount=argcount@entry=0,
kwnames=kwnames@entry=0x0, kwargs=0x0, kwcount=0, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:3930
#20 0x00000000004eae03 in PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwcount=0, kws=0x0, argcount=0, args=0x0, locals=locals@entry=0x7ffff6da3ed0,
globals=globals@entry=0x7ffff7f65390, _co=_co@entry=0x7ffff6da3ed0) at Python/ceval.c:3959
#21 PyEval_EvalCode (co=co@entry=0x7ffff6da3ed0, globals=globals@entry=0x7ffff7f4ff00, locals=locals@entry=0x7ffff7f4ff00) at Python/ceval.c:524
#22 0x00000000005220bf in run_mod (arena=0x7ffff7f65390, flags=0x7fffffffd800, locals=0x7ffff7f4ff00, globals=0x7ffff7f4ff00, filename=0x7ffff7f15f30, mod=0x9c34e0) at Python/pythonrun.c:1035
#23 PyRun_FileExFlags (fp=0x975850, filename_str=<optimized out>, start=<optimized out>, globals=0x7ffff7f4ff00, locals=0x7ffff7f4ff00, closeit=1, flags=0x7fffffffd800)
at Python/pythonrun.c:988
#24 0x00000000005222ec in PyRun_SimpleFileExFlags (fp=0x975850, filename=<optimized out>, closeit=1, flags=0x7fffffffd800) at Python/pythonrun.c:429
#25 0x0000000000430221 in pymain_run_file (p_cf=0x7fffffffd800, filename=0x91d470 L"tvr.py", fp=0x975850) at Modules/main.c:427
#26 pymain_run_filename (cf=0x7fffffffd800, pymain=0x7fffffffd910) at Modules/main.c:1606
#27 pymain_run_python (pymain=0x7fffffffd910) at Modules/main.c:2867
#28 pymain_main (pymain=pymain@entry=0x7fffffffd910) at Modules/main.c:3028
#29 0x00000000004304b9 in _Py_UnixMain (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:3063
#30 0x00007ffff7100830 in __libc_start_main (main=0x4205f0 <main>, argc=2, argv=0x7fffffffda68, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffda58)
at ../csu/libc-start.c:291
#31 0x000000000042a089 in _start ()
мои данные довольно разреженные, если я срезаю область с данными, она выглядит так
array_stack[90:110,920:930,1]
array([[ nan, nan, nan, nan, nan,
0.02228103, 0.02228103, 0.02228103, 0.02228103, 0.02228103],
[ nan, nan, nan, nan, nan,
0.02240379, 0.02240379, 0.02240379, 0.02240379, 0.02240379],
[ nan, nan, nan, nan, 0.02252662,
0.02252662, 0.02252662, 0.02252662, 0.02252662, 0.02252662],
[ nan, nan, nan, 0.02264952, 0.02264952,
0.02264952, 0.02264952, 0.02264952, 0.02264952, 0.02264952],
[ nan, nan, nan, 0.0227725 , 0.0227725 ,
0.0227725 , 0.0227725 , 0.0227725 , 0.0227725 , 0.0227725 ],
[ nan, nan, 0.02289555, 0.02289555, 0.02289555,
0.02289555, 0.02289555, 0.02289555, 0.02289555, 0.02289555],
[ nan, nan, 0.02301868, 0.02301868, 0.02301868,
0.02301868, 0.02301868, 0.02301868, 0.02301868, 0.02301868],
[ nan, nan, 0.02314188, 0.02314188, 0.02314188,
0.02314188, 0.02314188, 0.02314188, 0.02314188, 0.02314188],
[ nan, nan, 0.02326516, 0.02326516, 0.02326516,
0.02326516, 0.02326516, 0.02326516, 0.02326516, 0.02326516],
[ nan, nan, nan, 0.02338851, 0.02338851,
0.02338851, 0.02338851, 0.02338851, 0.02338851, 0.02338851],
[ nan, nan, nan, 0.02351194, 0.02351194,
0.02351194, 0.02351194, 0.02351194, 0.02351194, 0.02351194],
[ nan, nan, nan, nan, 0.02363544,
0.02363544, 0.02363544, 0.02363544, 0.02363544, 0.02363544],
[ nan, nan, nan, nan, nan,
nan, 0.02375902, 0.02375902, 0.02375902, 0.02375902],
[ nan, nan, nan, nan, nan,
nan, nan, nan, nan, 0.02388267],
[ nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan],
[ nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan],
[ nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan],
[ nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan],
[ nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan],
[ nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan]])
и я вызываю сегментацию вот так
from skimage import segmentation as seg
array = seg.slic(array_stack, n_segments = 10000, compactness=0.001, multichannel=True)
Я читал, что это может быть ошибка в пакете, который я использую, и мне может потребоваться зарегистрировать ошибку, но я не уверен, как определить причину по обратному следу.