SiamMask icon indicating copy to clipboard operation
SiamMask copied to clipboard

cannot connect to X server

Open ak9250 opened this issue 5 years ago • 9 comments

load pretrained model from SiamMask_DAVIS.pth [2019-03-10 04:08:45,841-rk0-load_helper.py# 25] remove prefix 'module.' [2019-03-10 04:08:45,843-rk0-load_helper.py# 18] used keys:356 : cannot connect to X server

ak9250 avatar Mar 10 '19 17:03 ak9250

load pretrained model from SiamMask_DAVIS.pth [2019-03-10 04:08:45,841-rk0-load_helper.py# 25] remove prefix 'module.' [2019-03-10 04:08:45,843-rk0-load_helper.py# 18] used keys:356 : cannot connect to X server

I got the same error message too!

Adhders avatar Mar 11 '19 06:03 Adhders

load pretrained model from SiamMask_DAVIS.pth [2019-03-10 04:08:45,841-rk0-load_helper.py# 25] remove prefix 'module.' [2019-03-10 04:08:45,843-rk0-load_helper.py# 18] used keys:356 : cannot connect to X server

you must run on the server. you should run on desktop linux or $: xhost +$HOSTNAME

Adhders avatar Mar 13 '19 14:03 Adhders

@Adhders will this work in google colab?

ak9250 avatar Mar 13 '19 16:03 ak9250

Test on tennis, you can save the results to the local, like this

46 try:
47 '''
48 init_rect = cv2.selectROI('SiamMask', ims[0], False, False)
49 x, y, w, h = init_rect
50 '''
51 x, y, w, h = 300, 110, 165, 250

69 '''
70 cv2.polylines(im, [np.int0(location).reshape((-1, 1, 2))], True, (0, 255, 0), 3) 71 cv2.imshow('SiamMask', im)
72 key = cv2.waitKey(1)
73 if key > 0:
74 break
75 '''
76 ##chegf write
77 name = './output/' + str(f).zfill(5) + '.jpg'
78 cv2.imwrite(name, im)

DHNicoles avatar Mar 14 '19 06:03 DHNicoles

[2019-03-14 16:11:28,851-rk0-load_helper.py# 31] load pretrained model from SiamMask_DAVIS.pth [2019-03-14 16:11:31,841-rk0-load_helper.py# 25] remove prefix 'module.' [2019-03-14 16:11:31,844-rk0-load_helper.py# 18] used keys:356 QObject::moveToThread: Current thread (0x55a9951de170) is not the object's thread (0x55a9379f0ff0). Cannot move to target thread (0x55a9951de170)

QObject::moveToThread: Current thread (0x55a9951de170) is not the object's thread (0x55a9379f0ff0). Cannot move to target thread (0x55a9951de170)

what can we do to solve this in a efficient way ?

Leon924 avatar Mar 14 '19 08:03 Leon924

This issue can be solved by the method DHNicoles mentioned above, plus, line 38 cv2.namedWindow("SiamMask", cv2.WND_PROP_FULLSCREEN) should also be uncommented. This issue is because you run the code on a server which can not show windows and display.

nigyiii avatar Mar 28 '19 07:03 nigyiii

This issue can be solved by the method DHNicoles mentioned above, plus, line 38 cv2.namedWindow("SiamMask", cv2.WND_PROP_FULLSCREEN) should also be uncommented. This issue is because you run the code on a server which can not show windows and display.

yea,Thanks。 It is works ! But, it only show that " SiamMask Time: 2.0s Speed: 35.3fps (with visulization!) "
just it? Anything else , pic? result file?

huangpan2507 avatar Dec 13 '19 05:12 huangpan2507

This issue can be solved by the method DHNicoles mentioned above, plus, line 38 cv2.namedWindow("SiamMask", cv2.WND_PROP_FULLSCREEN) should also be uncommented. This issue is because you run the code on a server which can not show windows and display.

yea,Thanks。 It is works ! But, it only show that " SiamMask Time: 2.0s Speed: 35.3fps (with visulization!) " just it? Anything else , pic? result file?

You should save frames with result visualization, and then transmit them to your local machine to see the results. @huangpan2507

nigyiii avatar Dec 13 '19 06:12 nigyiii

This issue can be solved by the method DHNicoles mentioned above, plus, line 38 cv2.namedWindow("SiamMask", cv2.WND_PROP_FULLSCREEN) should also be uncommented. This issue is because you run the code on a server which can not show windows and display.

yea,Thanks。 It is works ! But, it only show that " SiamMask Time: 2.0s Speed: 35.3fps (with visulization!) " just it? Anything else , pic? result file?

You should save frames with result visualization, and then transmit them to your local machine to see the results. @huangpan2507

OK ,Thanks. I mkdir output under the root ".../SiamMask-master/experiments/siammask_sharp/ " and run demo.py. The result are 65 pics

huangpan2507 avatar Dec 13 '19 07:12 huangpan2507