diff --git a/examples/va_example.ipynb b/examples/va_example.ipynb index 2bddca05..1f52caef 100644 --- a/examples/va_example.ipynb +++ b/examples/va_example.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 29, "metadata": {}, "outputs": [], "source": [ @@ -10,6 +10,7 @@ "import pandas as pd\n", "import textwrap\n", "import json\n", + "import os\n", "from IPython.display import Image\n", "from PIL import Image" ] @@ -393,7 +394,7 @@ } ], "source": [ - "ans = t(prompt=\"shoes\", image=\"/home/shankar/workspace/img/shoes.jpg\", box_threshold=0.30, iou_threshold=0.2)\n", + "ans = t(prompt=\"shoes\", image=\"shoes.jpg\", box_threshold=0.30, iou_threshold=0.2)\n", "len(ans[\"labels\"])" ] }, @@ -465,7 +466,7 @@ "metadata": {}, "outputs": [], "source": [ - "ans = t1(prompt=\"bird\", image=\"/home/shankar/workspace/img/birds.jpg\", box_threshold=0.40, iou_threshold=0.2)" + "ans = t1(prompt=\"bird\", image=\"birds.jpg\", box_threshold=0.40, iou_threshold=0.2)" ] }, { @@ -543,59 +544,52 @@ }, { "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [], - "source": [ - "t2 = va.tools.CLIP()" - ] - }, - { - "cell_type": "code", - "execution_count": 26, + "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'labels': ['crow', ' cheetah'], 'scores': [0.9999, 0.0001]}" + "{'labels': [], 'bboxes': [], 'masks': [], 'scores': []}" ] }, - "execution_count": 26, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "t2(prompt=\"crow, cheetah\", image=\"/home/shankar/workspace/img/birds.jpg\",)" + "t1(prompt=\"bird\", image=\"shoes.jpg\",)" ] }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 16, + "metadata": {}, + "outputs": [], + "source": [ + "t2 = va.tools.CLIP()" + ] + }, + { + "cell_type": "code", + "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "{'labels': [], 'bboxes': [], 'masks': [], 'scores': []}" + "{'labels': ['crow', ' cheetah'], 'scores': [0.9999, 0.0001]}" ] }, - "execution_count": 27, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "t1(prompt=\"bird\", image=\"/home/shankar/workspace/img/shoes.jpg\",)" + "t2(prompt=\"crow, cheetah\", image=\"birds.jpg\",)" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": {