Visualization#

Pharos is a plug-in of TensorBay SDK used for local visualization. After finishing the dataset organization, users can visualize the organized Dataset instance locally using Pharos. The visualization result can help users to check whether the dataset is correctly organized.

Install Pharos#

To install Pharos by pip, run the following command:

$ pip3 install pharos

Pharos Usage#

Organize a Dataset#

Take the BSTLD as an example:

from tensorbay.opendataset import BSTLD

dataset = BSTLD("<path/to/dataset>")

Visualize the Dataset#

from pharos import visualize

visualize(dataset)

Open the returned URL to see the visualization result.

../_images/visualization.jpg

Fig. 11 The visualized result of the BSTLD dataset.#

Note

By default, a pharos server runs locally at 127.0.0.1:5000 and is accessible only from localhost. To change the default setting, the following arguments in visualize() can be set:

  • port: the port the server runs in

  • host: the host ip to listen on

Visualize the Dataset on Remote Server#

Pharos supports accessing the server remotely via a web browser by setting host to "0.0.0.0". Then open http://{external IP}:{port} in the local browser to get the page. The external IP is external ip of the server which pharos runs on.

visualize(dataset, host="0.0.0.0", port=5000)