Enable GUI Visualization on Docker with X11 Forwarding (#11729)
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Gereziher Adhane <gereziherw@gmail.com> Co-authored-by: Francesco Mattioli <Francesco.mttl@gmail.com> Co-authored-by: Burhan <62214284+Burhan-Q@users.noreply.github.com>
This commit is contained in:
parent
bd5016211f
commit
06ff89b404
3 changed files with 108 additions and 3 deletions
|
|
@ -535,7 +535,8 @@ def check_imshow(warn=False):
|
|||
"""Check if environment supports image displays."""
|
||||
try:
|
||||
if LINUX:
|
||||
assert "DISPLAY" in os.environ and not IS_DOCKER and not IS_COLAB and not IS_KAGGLE
|
||||
assert not IS_COLAB and not IS_KAGGLE
|
||||
assert "DISPLAY" in os.environ, "The DISPLAY environment variable isn't set."
|
||||
cv2.imshow("test", np.zeros((8, 8, 3), dtype=np.uint8)) # show a small 8-pixel image
|
||||
cv2.waitKey(1)
|
||||
cv2.destroyAllWindows()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue