'extract image from a list like dict [closed]

I have a list, which my object detection prediction is stored like this.

[{'box': [tensor(28.36783, device='cuda:0'),
   tensor(32.88762, device='cuda:0'),
   tensor(41.10822, device='cuda:0'),
   tensor(44.73560, device='cuda:0')],
  'conf': tensor(0.91164, device='cuda:0'),
  'cls': tensor(0., device='cuda:0'),
  'label': 'pore 0.91',
  'im': array([[[124, 125, 125],
          [131, 131, 131],
          [128, 128, 128],
          ...,
          [ 45,  45,  44],
          [ 42,  43,  42],
          [ 42,  42,  41], dtype=uint8)}]

Can you please help me how can extract image array from this list just like?

img = array([[[124, 125, 125],
         [131, 131, 131],
         [128, 128, 128],
         ...,
         [ 45,  45,  44],
         [ 42,  43,  42],
         [ 42,  42,  41], dtype=uint8)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source