Xilinx / Vitis-AI

Vitis AI is Xilinx’s development stack for AI inference on Xilinx hardware platforms, including both edge devices and Alveo cards.
https://www.xilinx.com/ai
Apache License 2.0
1.49k stars 627 forks source link

"Can't initialize GTK backend in function 'cvInitSystem'" #1107

Closed cabreraam closed 1 year ago

cabreraam commented 1 year ago

Hi all,

I was following the instructions from here to flash the VCK190 image to an SD card, and then the instructions from here to run the resnet50 example. However, I error out with the following message:

root@xilinx-vck190-20221:~/Vitis-AI/examples/VART/resnet50# ./resnet50 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel                                                                                  
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1207 15:21:42.705144   976 main.cc:292] create running for subgraph: subgraph_conv1
XAIEFAL: INFO: Resource group Avail is created.
XAIEFAL: INFO: Resource group Static is created.
XAIEFAL: INFO: Resource group Generic is created.

Image : 001.jpg
top[0] prob = 0.982662  name = brain coral
top[1] prob = 0.008502  name = coral reef
top[2] prob = 0.006621  name = jackfruit, jak, jack
top[3] prob = 0.000543  name = puffer, pufferfish, blowfish, globefish
top[4] prob = 0.000330  name = eel
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.5.2) /usr/src/debug/opencv/4.5.2-r0/git/modules/highgui/src/window_gtk.cpp:624: error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem'

Aborted

I am using minicom to communicate with my VCK190 platform. Based on this issue from the OpenCV repository, it seems like it's an X11 issue. However, since I'm using minicom, I'm not really sure how to proceed here. Any help is appreciated!

lishixlnx commented 1 year ago

I don't think minicom can support X11 show. Please use other port such as DP or HDMI. Or for the aim to run the code, you can comment out the opencv part.

qianglin-xlnx commented 1 year ago

Closing since no activity for more than 2 weeks, please reopen if you still have any questions, thanks

dvdsosa commented 9 months ago

Hi all,

I was following the instructions from here to flash the VCK190 image to an SD card, and then the instructions from here to run the resnet50 example. However, I error out with the following message:

root@xilinx-vck190-20221:~/Vitis-AI/examples/VART/resnet50# ./resnet50 /usr/share/vitis_ai_library/models/resnet50/resnet50.xmodel                                                                                  
WARNING: Logging before InitGoogleLogging() is written to STDERR
I1207 15:21:42.705144   976 main.cc:292] create running for subgraph: subgraph_conv1
XAIEFAL: INFO: Resource group Avail is created.
XAIEFAL: INFO: Resource group Static is created.
XAIEFAL: INFO: Resource group Generic is created.

Image : 001.jpg
top[0] prob = 0.982662  name = brain coral
top[1] prob = 0.008502  name = coral reef
top[2] prob = 0.006621  name = jackfruit, jak, jack
top[3] prob = 0.000543  name = puffer, pufferfish, blowfish, globefish
top[4] prob = 0.000330  name = eel
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.5.2) /usr/src/debug/opencv/4.5.2-r0/git/modules/highgui/src/window_gtk.cpp:624: error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem'

Aborted

I am using minicom to communicate with my VCK190 platform. Based on this issue from the OpenCV repository, it seems like it's an X11 issue. However, since I'm using minicom, I'm not really sure how to proceed here. Any help is appreciated!

I faced the same issue when working with KV260. You need to use: export DISPLAY=:0 if you're working directly with the display output of the platform, otherwise use export DISPLAY=[your_ip_address]:0.0 if you’re working remotely.

Regards!