Skip to content

spoloxs/Image-Classifier-Rust

Repository files navigation

Pneumonia Classifier

This is a simple pneumonia classifier built with Rust and the tch-rs crate (Rust bindings for PyTorch). It uses a pretrained VGG19 model and fine-tunes it on the "Chest X-Ray Images (Pneumonia)" dataset.

Accuracy

The model achieves around 89% accuracy on the test set. Please note that this project is for educational and demonstration purposes and is not intended for real-world medical use. The model is not optimized for clinical accuracy.

Usage

1. Train the Model

To train the model, run the following command:

cargo run -- --train

This will train the model and save the weights to pneumonia_model_weights.ot.

2. Test a Single Image

To test a single image, use the --test_single flag followed by the path to the image:

cargo run -- --test_single path/to/your/image.jpeg

For example:

cargo run -- --test_single dataset/test/NORMAL/IM-0001-0001.jpeg

3. Run the Full Test Set

To run the model on the entire test set, use the --test flag:

cargo run -- --test

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages