btrack icon indicating copy to clipboard operation
btrack copied to clipboard

Generator Error (_is_binary)

Open yufang1039 opened this issue 4 years ago • 1 comments

When I'm using generator and pass it to btrack.utils.segmentation_to_objects, there's a strange error appears. I can't even find this function in the source code.

~\anaconda3\envs\pytorch_venv\lib\site-packages\btrack_localization.py in _is_binary(x) 46 47 def _is_binary(x: np.ndarray) -> bool: ---> 48 return ((x == 0) | (x == 1)).all() 49 50 if use_weighted_centroid and intensity_image is not None:

AttributeError: 'bool' object has no attribute 'all'

yufang1039 avatar Feb 20 '22 23:02 yufang1039

Hi there, can you post a code snippet to show the generator? It looks like you're passing a single bool rather than a numpy array.

quantumjot avatar Feb 21 '22 14:02 quantumjot

Closing as no follow up. Feel free to respond when possible.

paddyroddy avatar Jun 02 '23 16:06 paddyroddy