Large image classification dataset with multiple categories for training CNN models, transfer learning, and image recognition tasks.
This dataset contains thousands of labeled images across multiple categories, organized for image classification tasks. Perfect for training CNN models, transfer learning, image recognition, and computer vision applications.
- πΌοΈ Multiple Image Categories - Diverse categories covering animals, vehicles, nature, objects, and more
- π·οΈ Labeled Training Data - All images properly labeled and organized by category
- π Test & Validation Sets - Pre-split into training (70%), validation (15%), and test (15%) sets
- π Various Image Sizes - Images in multiple resolutions for different model requirements
- π§ Ready for CNN Training - Optimized format for Convolutional Neural Networks
image-classification/
βββ dataset/
β βββ train/ # 70% of data
β β βββ animals/
β β βββ vehicles/
β β βββ nature/
β β βββ food/
β β βββ buildings/
β β βββ ...
β βββ validation/ # 15% of data
β β βββ animals/
β β βββ vehicles/
β β βββ ...
β βββ test/ # 15% of data
β βββ animals/
β βββ vehicles/
β βββ ...
βββ scripts/
β βββ data_loader.py
β βββ train_model.py
β βββ augmentation.py
β βββ evaluate.py
βββ requirements.txt
βββ LICENSE
βββ README.md
# Clone the repository
git clone https://github.com/yourusername/image-classification.git
cd image-classification
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Image Classification Dataset - rskworld.in
# Author: Molla Samser | Email: help@rskworld.in
import os
import numpy as np
from PIL import Image
def load_dataset(data_dir):
"""Load images from the dataset directory."""
images = []
labels = []
categories = os.listdir(data_dir)
for idx, category in enumerate(categories):
category_path = os.path.join(data_dir, category)
for img_name in os.listdir(category_path):
img_path = os.path.join(category_path, img_name)
img = Image.open(img_path).resize((224, 224))
images.append(np.array(img))
labels.append(idx)
return np.array(images), np.array(labels)
# Load training data
X_train, y_train = load_dataset('dataset/train')
print(f"Training samples: {len(X_train)}")| Technology | Description |
|---|---|
| PNG/JPG | Image formats used in the dataset |
| NumPy | Numerical computing for array operations |
| PIL/Pillow | Python Imaging Library for image processing |
| OpenCV | Computer vision library for advanced operations |
| TensorFlow | Deep learning framework |
| PyTorch | Deep learning framework |
| Category | Training | Validation | Test |
|---|---|---|---|
| Animals | 1,050 | 225 | 225 |
| Vehicles | 840 | 180 | 180 |
| Nature | 700 | 150 | 150 |
| Food | 560 | 120 | 120 |
| Buildings | 630 | 135 | 135 |
| Fashion | 490 | 105 | 105 |
| Aircraft | 420 | 90 | 90 |
| Sports | 560 | 120 | 120 |
| Instruments | 350 | 75 | 75 |
| Electronics | 490 | 105 | 105 |
| Furniture | 420 | 90 | 90 |
| Plants | 490 | 105 | 105 |
| Total | 7,000 | 1,500 | 1,500 |
import tensorflow as tf
from tensorflow.keras import layers, models
# Build CNN Model
model = models.Sequential([
layers.Conv2D(32, (3, 3), activation='relu', input_shape=(224, 224, 3)),
layers.MaxPooling2D((2, 2)),
layers.Conv2D(64, (3, 3), activation='relu'),
layers.MaxPooling2D((2, 2)),
layers.Conv2D(128, (3, 3), activation='relu'),
layers.MaxPooling2D((2, 2)),
layers.Flatten(),
layers.Dense(256, activation='relu'),
layers.Dropout(0.5),
layers.Dense(num_classes, activation='softmax')
])
model.compile(
optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy']
)import torch
import torch.nn as nn
from torchvision import transforms, datasets
from torch.utils.data import DataLoader
# Define transforms
transform = transforms.Compose([
transforms.Resize((224, 224)),
transforms.ToTensor(),
transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225])
])
# Load dataset
train_dataset = datasets.ImageFolder('dataset/train', transform=transform)
train_loader = DataLoader(train_dataset, batch_size=32, shuffle=True)The dataset includes augmentation scripts for expanding your training data:
from tensorflow.keras.preprocessing.image import ImageDataGenerator
augmentation = ImageDataGenerator(
rotation_range=20,
width_shift_range=0.2,
height_shift_range=0.2,
horizontal_flip=True,
zoom_range=0.2,
shear_range=0.2,
fill_mode='nearest'
)This project is licensed under the MIT License - see the LICENSE file for details.
Molla Samser
- π Website: rskworld.in
- π§ Email: help@rskworld.in
- π± Phone: +91 93305 39277
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
Give a βοΈ if this project helped you!
For any inquiries or support, please reach out:
- Email: help@rskworld.in
- Phone: +91 93305 39277
- Website: https://rskworld.in
- Contact Page: https://rskworld.in/contact.php
Made with β€οΈ by RSK World