Khalid-Hamad/plant-seedlings-dataset
Preview β’ Updated β’ 545
How to use Khalid-Hamad/plant-seedlings-classifier with Keras:
# Available backend options are: "jax", "torch", "tensorflow".
import os
os.environ["KERAS_BACKEND"] = "jax"
import keras
model = keras.saving.load_model("hf://Khalid-Hamad/plant-seedlings-classifier")
A CNN model that classifies 12 species of plant seedlings, trained on the Plant Seedlings Dataset.
| Black-grass | Charlock | Cleavers |
| Common Chickweed | Common wheat | Fat Hen |
| Loose Silky-bent | Maize | Scentless Mayweed |
| Shepherds Purse | Small-flowered Cranesbill | Sugar beet |
Conv2D(32, 5Γ5) β BatchNorm β MaxPool β Dropout(0.2)
Conv2D(64, 5Γ5) β BatchNorm β MaxPool β Dropout(0.3)
Conv2D(64, 3Γ3) β BatchNorm β MaxPool β Dropout(0.4)
Conv2D(64, 3Γ3) β BatchNorm β MaxPool β Dropout(0.5)
GlobalMaxPooling2D β Dense(256) β Dropout(0.5) β Dense(12, softmax)
import numpy as np
import tensorflow as tf
model = tf.keras.models.load_model("plant_seedling_model.keras")
class_names = np.load("class_names.npy", allow_pickle=True)
plant_seedling_model.keras β Trained Keras modelclass_names.npy β Array of 12 class label stringsTrained on Google Colab with GPU. See the full training notebook at github.com/Khalid-Hamad/seedling-species-cv-cnn.
Model weights: educational use. Dataset: CC BY-SA 4.0.