Anuragleo67/audio-to-image-sample-knowledge-base
Sample Knowledge Base Dataset This folder contains a small starter dataset for the audio-to-image retrieval project. It has 15 educational diagram images and metadata that can be used to build a Pinecone vector index. Files data/sample_knowledge_base/ train/ images/ *.png metadata.csv README.md The images are generated educational diagrams for machine learning topics. What Each Image Record Needs Each image should have these… See the full description on the dataset page: https://huggingface.co/datasets/Anuragleo67/audio-to-image-sample-knowledge-base.
Sample Knowledge Base Dataset
This folder contains a small starter dataset for the audio-to-image retrieval project.
It has 15 educational diagram images and metadata that can be used to build a Pinecone vector index.
Files
data/sample_knowledge_base/
train/
images/
*.png
metadata.csv
README.mdThe images are generated educational diagrams for machine learning topics.
What Each Image Record Needs
Each image should have these fields:
Why image_path Matters
The app retrieves metadata from Pinecone, then uses image_path to find the actual image in the dataset.
Example Pinecone metadata:
{
"image_path": "images/linear_regression_best_fit.png",
"description": "A scatter plot showing data points and a straight best-fit line used in linear regression."
}The Hugging Face dataset row should have the same image_path.
Recommended Pinecone Vector Design
For each row:
vector id: id
vector values: OpenCLIP embedding of embedding_text
namespace: text_embeddings
metadata:
image_path
description
topic
titleIf using OpenCLIP ViT-B-32, your Pinecone index should use:
dimension: 512
metric: cosineLoading Locally With Hugging Face Datasets
You can test this dataset locally with:
from datasets import load_dataset
dataset = load_dataset(
"imagefolder",
data_dir="data/sample_knowledge_base",
split="train",
)
print(dataset[0])The dataset should include an image column plus the metadata fields from metadata.csv.
Dataset Topics
The 15 included images are:
- Linear Regression - Line of Best Fit
- Support Vector Machines - SVM Margin
- Principal Component Analysis - PCA Components
- Decision Trees - Decision Tree Split
- Neural Networks - Neural Network Layers
- Gradient Descent - Loss Minimization
- Model Evaluation - Confusion Matrix
- K-Nearest Neighbors - KNN Classification
- K-Means Clustering - Cluster Centroids
- Machine Learning Workflow - Train Test Split
- Model Generalization - Overfitting vs Underfitting
- Model Evaluation - ROC Curve
- Naive Bayes - Prior, Likelihood, Posterior
- Convolutional Neural Networks - CNN Convolution
- Transformers - Attention Mechanism
