I use plotly.express to show image stack which is numpy.ndarray. Code below works but it starts to be slow or not to show the result when size of numpy array increases. Image stack normally has (20,2000,2000) or more. Do you know how to handle this problem?
import plotly.express as px
import numpy as np
stack = [np.random.rand(*(2000,2000))*2 for _ in range(5)]
img = np.stack(stack)
print(np.shape(img))
print(type(img))
# fig = px.imshow(img[0])
# fig.show()
fig = px.imshow(img, animation_frame=0, labels=dict(animation_frame="slice"))
fig.show()