{ "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 }