yoloface icon indicating copy to clipboard operation
yoloface copied to clipboard

Cannot connect to X server

Open kevinzezel opened this issue 5 years ago • 4 comments

I got this error:

----- info ----- [i] The config file: ./cfg/yolov3-face.cfg [i] The weights of model file: ./model-weights/yolov3-wider_16000.weights [i] Path to image file: samples/outside_000001.jpg [i] Path to video file: ###########################################################

==> Skipping create the outputs/ directory... : cannot connect to X server

kevinzezel avatar Feb 20 '20 12:02 kevinzezel

If you are using google colab, then it is the problem, because the inside file contains showing some windows and video capturing, which are services not allowed in google colab, try to edit the file to make it run with any named windows or webcam captures.

AhmedKhaled945 avatar Mar 04 '20 09:03 AhmedKhaled945

You need to comment/remove all the cv2.windows commands as colab doesn't allow these optional window graphics. These following lines of code were changed for running yoloface on images:

def _main(): #wind_name = 'face detection using YOLOv3' #cv2.namedWindow(wind_name, cv2.WINDOW_NORMAL)

    #cv2.imshow(wind_name, frame)


    #key = cv2.waitKey(1)
    #if key == 27 or key == ord('q'):
    #    print('[i] ==> Interrupted by user!')
    #    break

#cap.release()
#cv2.destroyAllWindows()

Vivek-23-Titan avatar May 31 '20 07:05 Vivek-23-Titan

@Vivek-23-Titan thanks, that's work on command line vps. There is a way to get only the metadata of pixels position through command line? Great project.

Classsic avatar Jun 20 '20 17:06 Classsic

@Classsic , I am no expert but I think, I found something useful on this.

https://stackoverflow.com/questions/21697645/how-to-extract-metadata-from-a-image-using-python

Here, the meta data of an image is converted in a dictionary format. Hope this helps!

Vivek-23-Titan avatar Jun 21 '20 04:06 Vivek-23-Titan