CNN Methods
This is the documentation for the cnn-methods python library, which is a python project explores the application of advanced computer vision techniques for fruit classification and segmentation. A custom Convolutional Neural Network (CNN) was designed and implemented to classify different types of fruits, focusing on achieving high accuracy with an efficient architecture. The CNN was trained on a labeled dataset of fruit images, utilizing techniques such as data augmentation and optimization strategies to enhance performance and robustness.
Additionally, the project integrates a YOLO (You Only Look Once) model for real-time object detection and leverages the combination of YOLO and SAM (Segment Anything Model) for instance segmentation. This enables precise identification and segmentation of individual fruit instances, including segmentation with bounding boxes for more detailed analysis. The combination of custom and pre-trained models demonstrates versatility and effectiveness across multiple computer vision tasks.
Installation
Before installing, your system must satisfy these minimum requirements:
Python: >=3.8
Linux / MacOS: Windows is not supported because the triton package is not available for Windows and we use it for GPU acceleration. We recommend Google Colab to Windows users.
To install the project, you need to clone the repository and install the required dependencies. You will need to have Python 3.8 or higher installed on your system. Before installing the project, we recommend creating a virtual environment to avoid conflicts with other Python projects:
python3 -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
If you want to use the CNN visualization tools, you will need to install the graphviz package. You can install it using the following command:
sudo apt-get install graphviz
Warning
Beta Version This project is currently in beta version and still has work in progress. We recommend referring to the section How to Jupyter for detailed instructions.
Once you have activated the virtual environment, you can install the project dependencies using the following command:
pip install cnn-methods