Skip to content

JerryWhites/ModelTrainerCNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CNN Suit Classifier

This project implements a Convolutional Neural Network (CNN) using TensorFlow.NET and C# to classify images into two categories: Suit and No Suit. It's ideal for applications like automated dress-code verification, video surveillance, or personal projects involving image recognition.

Features

  • CNN Model built with TensorFlow.NET Keras API
  • Image Preprocessing (resizing, normalization)
  • Eager Execution for straightforward debugging
  • Training with Validation for accurate performance metrics

Project Structure

CNNTrainer/
├── vendor/
│   ├── ImageUtils.cs
│   └── ImageLoader.cs
├── CNNTrainer.cs
└── suit_classifier_model/ (generated after training)

Getting Started

Prerequisites

  • .NET 8.0 SDK
  • TensorFlow.NET
  • SciSharp.TensorFlow.Redist

Install via NuGet:

dotnet add package TensorFlow.NET
dotnet add package SciSharp.TensorFlow.Redist

Dataset Structure

Place your training and validation data in the following format:

Training CNN/
├── train/
│   ├── suit/
│   └── no_suit/
└── val/
    ├── suit/
    └── no_suit/

Training the Model

To train the model, update the dataset paths in CNNTrainer.cs and run:

dotnet run

The trained model will be saved to:

suit_classifier_model/

Using the Model

Load and utilize your trained TensorFlow.NET model for predictions in your applications.

Contributing

Feel free to fork the project and submit pull requests. Contributions and enhancements are welcome!

License

This project is open-source and licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages