Open shanchanggo opened 2 years ago
Hi, I cannot help you here, it is dependent of your machine and you will have to find a way to make your GPU visible somehow... Unfortunately this repo can only work on GPU.
em... watch it! gpu has got! but still have error. what cause it,do you know ?
When I train it at step1, the machine can find gpu and run normally! but when i run the visualize_synthetic-shapes.ipynb,
import cv2 import numpy as np from superpoint.datasets.synthetic_shapes import SyntheticShapes from superpoint.notebooks.utils import plot_imgs
config = { 'primitives': 'all', 'on-the-fly': True, 'preprocessing': {'resize': [120, 160], 'blur_size': 21} } dataset = SyntheticShapes(**config) data = dataset.get_test_set()
def draw_keypoints(img, corners, color): keypoints = [cv2.KeyPoint(c[1], c[0], 1) for c in np.stack(corners).T] return cv2.drawKeypoints(img.astype(np.uint8), keypoints, None, color=color) def display(d): return draw_keypoints(d['image'][..., 0] * 255, np.where(d['keypoint_map']), (0, 255, 0))
for i in range(8): plotimgs([display(next(data))/255. for in range(4)], dpi=200)
I don't know how to solve it . if you have time ,please help me. it is important! Thank you
Hi, sorry for the late reply. I have never had this issue in my case, and I am not sure how to solve it unfortunately. If you could localize where this depthwise convolution is happening in the code, you could try to convert to NHWC format as required by the error message. But from the current error message, the origin of the error is not obvious... You will have to debug by yourself I am afraid.
Hi,friends! good morning, I am coming again! I have finished trained of magic-point and superpoint. Thanks to your help! Now, I am trying visualization, some problems occurred!
When I run this in visualize_synthetic-shapes.ipynb,error occurred!
for i in range(8): plotimgs([display(next(data))/255. for in range(4)], dpi=200)
UnimplementedError Traceback (most recent call last)
~/anaconda3/envs/sp/lib/python3.6/site-packages/tensorflow/python/client/session.py in _do_call(self, fn, args) 1355 try: -> 1356 return fn(args) 1357 except errors.OpError as e:
~/anaconda3/envs/sp/lib/python3.6/site-packages/tensorflow/python/client/session.py in _run_fn(feed_dict, fetch_list, target_list, options, run_metadata) 1340 return self._call_tf_sessionrun( -> 1341 options, feed_dict, fetch_list, target_list, run_metadata) 1342
~/anaconda3/envs/sp/lib/python3.6/site-packages/tensorflow/python/client/session.py in _call_tf_sessionrun(self, options, feed_dict, fetch_list, target_list, run_metadata) 1428 self._session, options, feed_dict, fetch_list, target_list, -> 1429 run_metadata) 1430
UnimplementedError: Depthwise convolution on CPU is only supported for NHWC format [[{{node gaussian_blur/depthwise}}]] [[IteratorGetNext_5]]
During handling of the above exception, another exception occurred:
UnimplementedError Traceback (most recent call last)