Giter Club home page Giter Club logo

plantnet's Introduction

PlantNet

This repository contains a PyTorch implementation for the Plant Seedlings Classification problem. The goal is to classify images of plant seedlings into one of 12 different species based on their visual characteristics.

Requirements

  • Python 3.6 or later
  • PyTorch
  • scikit-learn
  • matplotlib

Usage

  1. Clone the repository:
git clone https://github.com/your-username/plant-seedlings-classification.git
cd plant-seedlings-classification
  1. Download the dataset and place it in the data/train directory. The dataset should contain images of plant seedlings, organized into subdirectories corresponding to the different species.

  2. Run the training script with the desired configuration:

python train.py --model resnet50 --data_dir data/train --batch_size 64 --num_epochs 50 --learning_rate 0.001

The available options are:

  • --model: The model architecture to use (squeezenet, resnet50, mobilenetv2, efficientnetb0, inceptionv3).
  • --data_dir: The directory containing the dataset.
  • --batch_size: The batch size for training and evaluation.
  • --num_epochs: The number of training epochs.
  • --learning_rate: The learning rate for the optimizer.
  • --num_classes: The number of classes in the dataset (default: 12).
  • --test_size: The fraction of the dataset to be used as the test set (default: 0.2).
  • --val_size: The fraction of the dataset to be used as the validation set (default: 0.2).
  1. The training process will start, and the loss, accuracy, precision, recall, and F1-score for both the training and validation sets will be logged and displayed in the console.

  2. After training, the model weights will be saved in the results directory, along with plots showing the loss, accuracy, precision, recall, and F1-score over the training epochs.

Code Structure

  • train.py: The main script for training the model.
  • load_dataset.py: Contains functions for loading and splitting the dataset.
  • net.py: Defines the model architectures (SqueezeNet, ResNet50, MobileNetV2, EfficientNetB0, InceptionV3).

License

This project is licensed under the MIT License.

Acknowledgments

plantnet's People

Contributors

sir-teo avatar wwwendyy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.