File size: 1,800 Bytes
32b542e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "df7559ae-7130-46d2-9ea1-6a8276893274",
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "sys.path.append('../')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "7562f117-2723-4cf8-80d3-9f0363f82c8e",
   "metadata": {},
   "outputs": [],
   "source": [
    "from uniperceiver.datasets import TCSLoader\n",
    "tcs_loader = TCSLoader('../slurm_tools/petreloss_1400.config')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "46d941b6-47bc-42b4-992b-cdf403675e47",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "xdg-open: no method available for opening '/tmp/tmpj8ge0htm.PNG'\n",
      "xdg-open: no method available for opening '/tmp/tmpuw7r_irw.PNG'\n"
     ]
    }
   ],
   "source": [
    "images = [ 'cluster2:s3://imagenet/train/n02127052/n02127052_19569.JPEG', 's3://visual_genome/images/VG_100K/2368406.jpg']\n",
    "for image_path in images:\n",
    "    img = tcs_loader(image_path).convert('RGB')\n",
    "    img.show()\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "2b5375e0-ea19-4b08-9cde-d50fe77dd5eb",
   "metadata": {},
   "outputs": [],
   "source": [
    "img\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.13"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}