Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update broken image links #350

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
"\n",
"The model derives from **bag of words** in natural language processing (NLP). Which is where a chunk of text is split into words or sub-words and those components are collated into an unordered list, the so called \"bag of words\" (BoW). \n",
"\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/bag-of-visual-words/assets/nlp-bow-bag.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> \n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/bag-of-visual-words/assets/nlp-bow-bag.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> \n",
"\n",
"Similarly, in bag of *visual* words the images are represented by patches, and their unique patterns (or *visual features*) are extracted into an imaginary bag. However, these visual features are not \"visual words\" just yet.\n",
"\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/bag-of-visual-words/assets/BOW.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center>"
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/bag-of-visual-words/assets/BOW.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center>"
]
},
{
Expand Down Expand Up @@ -63,7 +63,7 @@
"source": [
"K-means divides the data into $k$ clusters, where $k$ is chosen by us. Once the data is grouped, k-means calculates the mean for each cluster, i.e., a central point between all of the vectors in a group. The central point represents a *centroid*, i.e., a *visual word*. \n",
"\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/bag-of-visual-words/assets/clustering.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center>\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/bag-of-visual-words/assets/clustering.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center>\n",
"\n",
"After finding the centroids, k-means iterates through each data point (visual feature) and checks which centroid (visual word) is nearest. If the nearest centroid has changed, the data point switches grouping, being assigned to the new nearest centroid. Then, we repeat the centroid computation of above.\n",
"\n",
Expand All @@ -90,7 +90,7 @@
"source": [
"When we perform the mapping from new visual feature vectors to the nearest centroid (i.e., visual word), we are essentially categorizing visual features into a more limited set of visual words. This process of reducing the number of possible unique values/vectors is called *quantization*. So for us, this is *vector quantization*.\n",
"\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/bag-of-visual-words/assets/vq.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center>\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/bag-of-visual-words/assets/vq.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center>\n",
"\n",
"Using a limited set of visual words allows us to compress our image descriptions into a set of visual word IDs. And, more importantly, represent similar features shared across images using a shared set of visual words.\n",
"\n",
Expand All @@ -107,7 +107,7 @@
"\n",
"If we consider $2$ images, we can represent the image histograms as follows:\n",
"\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/bag-of-visual-words/assets/histograms-basic.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center> \n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/bag-of-visual-words/assets/histograms-basic.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center> \n",
"\n",
"To create these representations, we have converted each image into a sparse vector where each value in the vector represents an item in the codebook (i.e., the x-axis in the histograms). Most of the values in each vector will be *zero* because most images will only contain a small percentage of total number of visual words, this is why we refer to them as *sparse* vectors.\n",
"\n",
Expand All @@ -122,7 +122,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/bag-of-visual-words/assets/tf-idf.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center>"
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/bag-of-visual-words/assets/tf-idf.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center>"
]
},
{
Expand Down Expand Up @@ -161,7 +161,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/bag-of-visual-words/assets/histograms.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center>"
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/bag-of-visual-words/assets/histograms.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center>"
]
},
{
Expand Down Expand Up @@ -211,7 +211,7 @@
"\n",
"It equals $1$ if the vectors are pointing in the same direction (the angle equals $0$), and $0$ if vectors are orthogonal.\n",
"\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/bag-of-visual-words/assets/cosine.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center>"
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/bag-of-visual-words/assets/cosine.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center>"
]
},
{
Expand All @@ -225,7 +225,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/bag-of-visual-words/assets/cosine-img.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center>"
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/bag-of-visual-words/assets/cosine-img.png\" alt=\"Drawing\" style=\"width:400px;\"/></div> </center>"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
"source": [
"The first step is done. We are now almost ready to process those patches using CLIP. Before doing it, we might want to work through these patches by grouping them into a 6x6 window.\n",
"\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/clip-object-detection/assets/window.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> "
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/clip-object-detection/assets/window.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> "
]
},
{
Expand Down Expand Up @@ -1153,7 +1153,7 @@
"The first column represents non-zero row positions, while the second column non-zero column positions. We can visualize the above co-ordinates as follows:\n",
"\n",
"\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/clip-object-detection/assets/detection-coordinates.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> \n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/clip-object-detection/assets/detection-coordinates.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> \n",
"<center><small>Co-ordinates of patches with similarity score > 0.5.</small></center>"
]
},
Expand All @@ -1162,7 +1162,7 @@
"metadata": {},
"source": [
"The bounding box we want to design, will be around the area of interest.\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/clip-object-detection/assets/bounding-box.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> \n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/clip-object-detection/assets/bounding-box.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> \n",
"<center><small>Bounding box.</small></center>"
]
},
Expand All @@ -1172,7 +1172,7 @@
"source": [
"We can build it by calculating its corners, which correspond to the minimum and maximum $x$ and $y$ co-ordinates, i.e., $(x_{min}, y_{min})$, $(x_{max}, y_{min})$, $(x_{min}, y_{max})$, and $(x_{max}, y_{max})$.\n",
"\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/clip-object-detection/assets/bounding-coordinates.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> \n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/clip-object-detection/assets/bounding-coordinates.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> \n",
"<center><small>Bounding box corners' co-ordinates.</small></center>"
]
},
Expand Down Expand Up @@ -1261,7 +1261,7 @@
"source": [
"We use `(y_max - y_min)` and `(x_max - x_min)` to calculate the height and width of the bounding box respectively...\n",
"\n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/image-retrieval/clip-object-detection/assets/box-height-width.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> \n",
"<center><div> <img src=\"https://raw.githubusercontent.com/pinecone-io/examples/master/learn/search/image/image-retrieval-ebook/clip-object-detection/assets/box-height-width.png\" alt=\"Drawing\" style=\"width:300px;\"/></div> </center> \n",
"<center><small>Height and width calculations.</small></center>\n"
]
},
Expand Down