# CNN & YOLO+SAM Segmentation

<img width="100%" src="https://kajabi-storefronts-production.kajabi-cdn.com/kajabi-storefronts-production/file-uploads/blogs/22606/images/f8d6362-3e5e-c73-a7a4-e54525b5431a_banner-yolov8.png" alt="YOLO Vision banner"></a>
<br><br>
<img width="100%" src="https://github.com/rorro6787/rorro6787/blob/main/Images/sam.jpg" alt="SAM"></a>

This 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.

## Table of Contents
- [Requirements](#requirements)
- [Installation and Usage](#installation-and-usage)
- [Contributors](#contributors)
- [Contributing](#contributing)

## Requirements
- Python 3.X.X
- Linux / MacOS

## Installation and Usage
For a detailed walkthrough of the steps to install and use the Python package and Jupyter notebooks, refer to the official library's documentation here: [Official Documentation](https://rorro6787.github.io/CNN-YOLO-SAM-segmentation/)

## Contributors
- [![GitHub](https://img.shields.io/badge/GitHub-100000?style=flat&logo=github&logoColor=white)](https://github.com/rorro6787) [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=flat&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/emilio-rodrigo-carreira-villalta-2a62aa250/) **Emilio Rodrigo Carreira Villalta**

## Contributing
Contributions are welcome! Please follow these steps:

1. Fork the repository
2. Create a new branch (`git checkout -b feature-branch`)
3. Commit your changes (`git commit -m 'Add new feature'`)
4. Push to the branch (`git push origin feature-branch`)
5. Create a new Pull Request
