|
52 | 52 | "source": [ |
53 | 53 | "This notebook is Part 2 of the enrichment notebook series where we utilize various zero-shot models to enrich the metadata of existing dataset.\n", |
54 | 54 | "\n", |
55 | | - "+ [Part 1](https://github.com/visual-layer/fastdup/blob/main/examples/enrichment-zero-shot-classification.ipynb) - Dataset Enrichment with Zero-Shot Classification Models\n", |
56 | | - "+ [Part 2](https://github.com/visual-layer/fastdup/blob/main/examples/enrichment-zero-shot-detection.ipynb) - Dataset Enrichment with Zero-Shot Detection Models\n", |
57 | | - "+ [Part 3](https://github.com/visual-layer/fastdup/blob/main/examples/enrichment-zero-shot-segmentation.ipynb) - Dataset Enrichment with Zero-Shot Segmentation Models\n", |
| 55 | + "+ [Part 1](https://visual-layer.readme.io/docs/enrichment-zero-shot-classification) - Dataset Enrichment with Zero-Shot Classification Models\n", |
| 56 | + "+ [Part 2](https://visual-layer.readme.io/docs/enrichment-zero-shot-detection) - Dataset Enrichment with Zero-Shot Detection Models\n", |
| 57 | + "+ [Part 3](https://visual-layer.readme.io/docs/enrichment-zero-shot-segmentation) - Dataset Enrichment with Zero-Shot Segmentation Models\n", |
58 | 58 | "\n", |
59 | 59 | "If you haven't checkout out [Part 1](https://github.com/visual-layer/fastdup/blob/main/examples/enrichment-zero-shot-classification.ipynb), we highly encourage you to go through it first before proceeding with this notebook.\n", |
60 | 60 | "\n", |
|
94 | 94 | "metadata": {}, |
95 | 95 | "outputs": [], |
96 | 96 | "source": [ |
97 | | - "!pip install -Uq fastdup mmengine mmdet groundingdino-py git+https://github.com/xinyu1205/recognize-anything.git gdown" |
| 97 | + "!pip install -Uq fastdup mmengine mmdet groundingdino-py gdown" |
98 | 98 | ] |
99 | 99 | }, |
100 | 100 | { |
|
137 | 137 | }, |
138 | 138 | "source": [ |
139 | 139 | "## Download Dataset\n", |
140 | | - "Download the [coco-minitrain](https://github.com/giddyyupp/coco-minitrain) dataset - a curated mini training set consisting of 20% of COCO 2017 training dataset. The coco-minitrain consists of 25,000 images and annotations." |
| 140 | + "Download the [coco-minitrain](https://github.com/giddyyupp/coco-minitrain) dataset - A curated mini training set consisting of 20% of COCO 2017 training dataset. The coco-minitrain consists of 25,000 images and annotations." |
141 | 141 | ] |
142 | 142 | }, |
143 | 143 | { |
|
162 | 162 | "\n", |
163 | 163 | "Apart from zero-shot recognition models, fastdup also supports zero-shot detection models like [Grounding DINO](https://github.com/IDEA-Research/GroundingDINO) (and more to come).\n", |
164 | 164 | "\n", |
165 | | - "Grounding DINO is a powerful open-set zero-shot detection model. It accepts image-text pair as inputs and outputs a bounding box." |
| 165 | + "Grounding DINO is a powerful zero-shot detection model. It accepts image-text pair as inputs and outputs a bounding box." |
166 | 166 | ] |
167 | 167 | }, |
168 | 168 | { |
|
172 | 172 | "tags": [] |
173 | 173 | }, |
174 | 174 | "source": [ |
175 | | - "### Inference on a DataFrame of images\n", |
176 | | - "\n" |
177 | | - ] |
178 | | - }, |
179 | | - { |
180 | | - "cell_type": "markdown", |
181 | | - "id": "37a3aa66-de23-4f1c-9bf0-ff7f30db2a6c", |
182 | | - "metadata": { |
183 | | - "tags": [] |
184 | | - }, |
185 | | - "source": [ |
| 175 | + "### 1. Inference on a bulk of images\n", |
| 176 | + "\n", |
186 | 177 | "\n", |
187 | 178 | "In [Part 1](https://github.com/visual-layer/fastdup/blob/main/examples/enrichment-zero-shot-classification.ipynb) of the enrichment notebook series, we utilized zero-shot image tagging models such as Recognize Anything Model and ran an inference over the images in our dataset.\n", |
188 | 179 | "\n", |
189 | | - "We ended up with a DataFrame consisting of `filename` and `ram_tags` column as follows." |
| 180 | + "We ended up with a DataFrame consisting of the `filename` and `ram_tags` column as follows.\n" |
190 | 181 | ] |
191 | 182 | }, |
192 | 183 | { |
|
337 | 328 | "id": "2ccb3248-2299-4582-8c20-99164d26ac8b", |
338 | 329 | "metadata": {}, |
339 | 330 | "source": [ |
340 | | - "If you'd like to reproduce the above dataframe, [Part 1](https://github.com/visual-layer/fastdup/blob/main/examples/enrichment-zero-shot-classification.ipynb) notebook details the code you need to run." |
| 331 | + "If you'd like to reproduce the above DataFrame, [Part 1](https://github.com/visual-layer/fastdup/blob/main/examples/enrichment-zero-shot-classification.ipynb) notebook details the code you need to run." |
341 | 332 | ] |
342 | 333 | }, |
343 | 334 | { |
|
840 | 831 | "id": "097b34b9-2c41-47d4-a4bd-555df504b75f", |
841 | 832 | "metadata": {}, |
842 | 833 | "source": [ |
843 | | - "Now lets run the enrichment with the custom prompt column." |
| 834 | + "Now lets run the enrichment with the `custom_prompt` column." |
844 | 835 | ] |
845 | 836 | }, |
846 | 837 | { |
|
1130 | 1121 | "tags": [] |
1131 | 1122 | }, |
1132 | 1123 | "source": [ |
1133 | | - "### Inference on single image\n", |
| 1124 | + "### 2. Inference on single image\n", |
1134 | 1125 | "fastdup provides an easy way to load the Grounding DINO model and run an inference.\n", |
1135 | 1126 | "\n", |
1136 | 1127 | "Let's suppose we have the following image and would like to run an inference with the Grounding DINO model." |
|
1342 | 1333 | "source": [ |
1343 | 1334 | "## Convert Annotations to COCO Format\n", |
1344 | 1335 | "\n", |
1345 | | - "Once the enrichment is complete, you can also conveniently export the DataFrame into the COCO .json annotation format. For now, only the bounding boxes and labels are exported. Masks will be added in a future release." |
| 1336 | + "Once the enrichment is complete, you can also conveniently export the DataFrame into the COCO `.json` annotation format. For now, only the bounding boxes and labels are exported. Masks will be added in a future release." |
1346 | 1337 | ] |
1347 | 1338 | }, |
1348 | 1339 | { |
|
1373 | 1364 | "\n", |
1374 | 1365 | "This notebook is Part 2 of the dataset enrichment notebook series where we utilize various zero-shot models to enrich datasets.\n", |
1375 | 1366 | "\n", |
1376 | | - "+ [Part 1](https://github.com/visual-layer/fastdup/blob/main/examples/enrichment-zero-shot-classification.ipynb) - Dataset Enrichment with Zero-Shot Classification Models\n", |
1377 | | - "+ [Part 2](https://github.com/visual-layer/fastdup/blob/main/examples/enrichment-zero-shot-detection.ipynb) - Dataset Enrichment with Zero-Shot Detection Models\n", |
1378 | | - "+ [Part 3](https://github.com/visual-layer/fastdup/blob/main/examples/enrichment-zero-shot-segmentation.ipynb) - Dataset Enrichment with Zero-Shot Segmentation Models\n", |
| 1367 | + "+ [Part 1](https://visual-layer.readme.io/docs/enrichment-zero-shot-classification) - Dataset Enrichment with Zero-Shot Classification Models\n", |
| 1368 | + "+ [Part 2](https://visual-layer.readme.io/docs/enrichment-zero-shot-detection) - Dataset Enrichment with Zero-Shot Detection Models\n", |
| 1369 | + "+ [Part 3](https://visual-layer.readme.io/docs/enrichment-zero-shot-segmentation) - Dataset Enrichment with Zero-Shot Segmentation Models\n", |
1379 | 1370 | "\n", |
1380 | | - "Please check out [Part 3](https://github.com/visual-layer/fastdup/blob/main/examples/enrichment-zero-shot-segmentation.ipynb) of the series where we explore how to generate masks from the bounding boxes using zero-shot segmentation models like Segment Anything. See you there!\n", |
| 1371 | + "Please check out [Part 3](https://visual-layer.readme.io/docs/enrichment-zero-shot-segmentation) of the series where we explore how to generate masks from the bounding boxes using zero-shot segmentation models like Segment Anything. See you there!\n", |
1381 | 1372 | "\n", |
1382 | 1373 | "Questions about this tutorial? Reach out to us on our [Slack channel](https://visuallayer.slack.com/)!\n", |
1383 | 1374 | "\n", |
|
0 commit comments