Skip to content

This repository contains all the Pytorch models and code used in the project

License

Notifications You must be signed in to change notification settings

KroniaPytorch/KroniaModels

Repository files navigation

Kronia Models

This repository contains all the Pytorch models and the related code used in the development of this project

Motivation

Our prime motivation for making this App was to provide an application that can be used by farmers and agricultural workers all around the globe. We wanted to make sure that our application provides a ton of really helpful features and also delivers it with a certain level of finesse.

Repository Overview

This repository contains the following folders :

  • HelperFunctions: This folder contains the helper functions that were used to develop the jupyter notebooks.We advise new users to not mess with these files and focus on running the model notebooks.
  • CornDisease : This folder contains necessary notebooks for training and testing the model on corn diseases
  • CottonDisease : This folder contains necessary notebooks for training and testing the model on cotton diseases
  • Crop-Recommender : This folder contains necessary notebooks for training and testing the crop recommendation model
  • FertilizerRecommender : This folder contains necessary notebooks for training and testing the model on fertilizer recommendation model
  • FruitsClassifier : This folder contains necessary notebooks for training and testing the fruit classifier model
  • LeavesDisease : This folder contains necessary notebooks for training and testing the model on several fruits and vegetable diseases
  • RiceDisease : This folder contains necessary notebooks for training and testing the model on rice diseases
  • Soil
    • SoilNet : This folder contains necessary notebooks for training and testing the model that can filter between soil and non soil images
    • soil type : This folder contains necessary notebooks for training and testing the model that classify between different soil types
  • WheatDisease : This folder contains necessary notebooks for training and testing the model on wheat diseases
  • YYMDisease : This folder contains necessary notebooks for training and testing the model on okra leaves (LadyFinger) suffering from yellow vein mosaic disease

Client-Side Architecture

Blank diagram

Tech Stack

The following libraries and APIs were used for the development of our project :

Related Repos

The list of related repositories that were used to develop Kronia can be found here

Setup and Install

To properly set up this project on a local machine, please carefully go through the following steps

Install Anaconda

  • Users can install Anaconda from here

Create a new environment

  • We highly recommend the readers create a new virtual environment for working on this project, as this will prevent users from messing up their local environments (that have already been setup)
  • For beginners and new users, please refer to this link to know more about virtual environments and how to set up a new virtual environment
  • To set up a new environment :
    • Beginner Friendly
      • If you haven't installed Anaconda please install Anaconda and then Open the Anaconda Navigator.
      • Click on the environment tab (visible on the left side of the window)
      • Click on the create button to create an environment
    • Advanced
      • Run conda create name_of_env
      • Run activate name_of_env (Windows) or source activate name_of_env (Linux/macOS) to switch into the created environment.(An anaconda cheatsheet can be found here)

Install the dependencies

  • Now we need to install all the libraries that have been listed in the tech stack section.
    • Install Pytorch
    • Install Sklearn or Install from Anaconda Navigator
    • Install Pillow or Install from Anaconda Navigator
    • Install Numpy or Install from Anaconda Navigator
    • Install Pandas or Install from Anaconda Navigator
    • Install Matplotlib or Install from Anaconda Navigator

Clone this repository

  • Move into the desired location on your local setup and make sure that you are using the correct virtual environment.
  • In the appropriate terminal, run git clone https://github.com/KroniaPytorch/KroniaModels.git to get the codebase

Inference

  • Once the dependencies have been installed and the code-base cloned, the user can now train the model or test it on custom images
  • Please keep in mind the folder hierarchy and move into the appropriate folder
  • To train the model again (with your tweaked settings), run the notebook with the name that matches the folder
  • To test the model, make sure you have downloaded the weights(read next step) or have generated a new weight file by training the model and then run Inference notebook in the folder
  • Weights for the particular model can be downloaded from here
  • Please note: Before Running the model, make sure you are running the notebook from the appropriate environment

Quick Setup

  • If for some reason the user finds some trouble in installing the code, we also provide "Quick-Use" files that can be used by the user to test the models on custom images
  • The user can find the files here
  • The user will find an Inference ("Quick Use") file that can be executed in Google Colab along with the appropriate weight files(available in the link mentioned above)

About

This repository contains all the Pytorch models and code used in the project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published