Closed seekingdeep closed 2 years ago
Hi there, when trying to predict using "prediction.ipynb", i am getting error in the "Prediction" step
2022-03-23 21:46:09.063463: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7 2022-03-23 21:46:09.955174: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10 --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Input In [5], in <cell line: 2>() 1 img = normalize(X[16], 1,99.8, axis=axis_norm) ----> 2 labels, details = model.predict_instances(img) File ~/programs/splinedist/splinedist/models/base.py:446, in SplineDistBase.predict_instances(self, img, axes, normalizer, prob_thresh, nms_thresh, n_tiles, show_tile_progress, verbose, predict_kwargs, nms_kwargs, overlap_label) 443 _shape_inst = tuple(s for s,a in zip(_permute_axes(img).shape, _axes_net) if a != 'C') 445 prob, dist = self.predict(img, axes=axes, normalizer=normalizer, n_tiles=n_tiles, show_tile_progress=show_tile_progress, **predict_kwargs) --> 446 return self._instances_from_prediction(_shape_inst, prob, dist, prob_thresh=prob_thresh, nms_thresh=nms_thresh, overlap_label=overlap_label, **nms_kwargs) File ~/programs/splinedist/splinedist/models/model2d.py:398, in SplineDist2D._instances_from_prediction(self, img_shape, prob, dist, prob_thresh, nms_thresh, overlap_label, **nms_kwargs) 395 if overlap_label is not None: raise NotImplementedError("overlap_label not supported for 2D yet!") 397 coord = dist_to_coord(dist, grid=self.config.grid) --> 398 inds = non_maximum_suppression(coord, prob, grid=self.config.grid, 399 prob_thresh=prob_thresh, nms_thresh=nms_thresh, **nms_kwargs) 400 labels = polygons_to_label(coord, prob, inds, shape=img_shape) 401 # sort 'inds' such that ids in 'labels' map to entries in polygon dictionary entries File ~/programs/splinedist/splinedist/nms.py:62, in non_maximum_suppression(coord, prob, grid, b, nms_thresh, prob_thresh, verbose, max_bbox_search) 59 if verbose: 60 t = time() ---> 62 survivors[ind] = c_non_max_suppression_inds(polygons.astype(np.int32), 63 mapping, np.float32(nms_thresh), np.int32(max_bbox_search), 64 np.int32(grid[0]), np.int32(grid[1]),np.int32(verbose)) 66 if verbose: 67 print("keeping %s/%s polygons" % (np.count_nonzero(survivors), len(polygons))) TypeError: function takes exactly 6 arguments (7 given)
this issue is solved. have a look https://github.com/uhlmanngroup/splinedist/issues/2#issuecomment-976439395
Hi there, when trying to predict using "prediction.ipynb", i am getting error in the "Prediction" step