You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When giving two boundary maps to hg.match_pixels_image_2d, but there are no boundaries that match, the function hg.cpp._get_bipartite_matching_graph_contour_image_2d (used inside the code of hg.match_pixels_image_2d) basically returns that nothing matched, notably with an empty weights on which a np.max operation is performed afterwards, causing the following error:
line 46, in dummy_function
sources, targets = hg.match_pixels_image_2d(ucm_th, bmap, max_distance=params["max_dist"])
line 345, in match_pixels_match
matched_edges = hg.bipartite_graph_matching((sources, targets, num_nodes1 + num_nodes2), (weights * 1000).astype(np.int64))
line 144, in bipartite_graph_matching
very_large_weight = np.max(edge_weights) * 1000
line 2705, in amax
return _wrapreduction(a, np.maximum, 'max', axis, None, out,
line 87, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation maximum which has no identity
The text was updated successfully, but these errors were encountered:
lapertor
changed the title
hg.match_pixels_image_2d fails when nothing matches between the two boundary mapshg.match_pixels_image_2d fails when nothing matches between the two boundary maps
Jul 21, 2023
When giving two boundary maps to
hg.match_pixels_image_2d
, but there are no boundaries that match, the functionhg.cpp._get_bipartite_matching_graph_contour_image_2d
(used inside the code ofhg.match_pixels_image_2d
) basically returns that nothing matched, notably with an emptyweights
on which anp.max
operation is performed afterwards, causing the following error:The text was updated successfully, but these errors were encountered: