Remote Viewer (Experimental) - edoli/edolview GitHub Wiki

Warning
Remote image loader feature is in experimental. This feature may not work properly.

Setup

When you want to see image on remote server you can use remote viewer feature of EdolView. This feature uses socket communication between EdolView and remote server. A host name and a port number can be found on toolbar.

image

First step is setup reverse SSH tunneling. This allows remote server to access local image viewer.

ssh -R 31232:127.0.0.1:21734 username@remoteserver
  • The -R (reverse) option determines remote port forwarding, allowing remote server to access your laptop (127.0.0.1).
  • The "31232:127.0.0.1:21734 " tells ssh that connection requests to port 31232 on the remote server should be forwarded to port 21734 on the local computer. You can pick any port number, but it is safe to use one of unofficial ports.
  • username@remoteserver is the user account the remote computer is going to connect.

Here, default port is 21734 (the port can be different).

Using Python Script

To send image from remote serve to local viewer, download python script python/edolview.py and use send_image function. A port number of EdolView class should be same as forwarded port. For example if you forward port 31232 then code looks like following:

import cv2
image = cv2.imread('some_image.exr', -1)
ev = EdolView(port=31232)
ev.send_image('some name', image)

If you use default port (21734), you can omit the port number.

https://github.com/edoli/edolview/assets/2304569/d86dd66a-70e3-4d41-bccb-155132373170

Using Visual Studio Code Extension

Another way of using remote viewer feature is using vscode extension. This extension can be installed in vscode Marketplace. After installing extension, Send Image to EdolView item appears on context menu of VARIABLES and files in EXPLORER. After you clicked the button data of variable or file is sent to EdolView and show the image file.

Context menu of variable Context menu of file

Currently vscode extension only support Numpy and PyTorch data in python. I have plan to support C++ OpenCV data in future.

https://github.com/edoli/edolview/assets/2304569/b4e9f789-048b-4142-bd1f-2d7cfa7848d7