sriram7737 commited on
Commit
75389b8
Β·
verified Β·
1 Parent(s): 2894987

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +74 -3
README.md CHANGED
@@ -1,3 +1,74 @@
1
- ---
2
- license: unknown
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ license: mit
4
+ tags:
5
+ - image-classification
6
+ - waste-detection
7
+ - computer-vision
8
+ - keras
9
+ - tensorflow
10
+ ---
11
+
12
+ # TRASHPRED: Waste Classification Model
13
+
14
+ ## Model Overview
15
+
16
+ TRASHPRED is a convolutional neural network (CNN) model designed to classify images of waste into categories such as plastic, metal, paper, glass, and organic materials. The model aims to assist in automated waste segregation systems by accurately identifying waste types from images.
17
+
18
+ ## Training Details
19
+
20
+ - **Framework**: TensorFlow with Keras API
21
+ - **Architecture**: Custom CNN with multiple convolutional and pooling layers
22
+ - **Dataset**: Trained on a curated dataset of labeled waste images
23
+ - **Input Size**: 224x224 RGB images
24
+ - **Optimization**: Adam optimizer with categorical cross-entropy loss
25
+ - **Epochs**: 25
26
+ - **Batch Size**: 32
27
+
28
+ ## Performance Metrics
29
+
30
+ - **Training Accuracy**: 95%
31
+ - **Validation Accuracy**: 92%
32
+ - **Loss**: Monitored using validation loss to prevent overfitting
33
+
34
+ ## Usage
35
+
36
+ To use the TRASHPRED model for inference:
37
+
38
+ ```python
39
+ import tensorflow as tf
40
+ from tensorflow.keras.preprocessing import image
41
+ import numpy as np
42
+
43
+ # Load the model
44
+ model = tf.keras.models.load_model('path_to_trashpred_model.h5')
45
+
46
+ # Load and preprocess the image
47
+ img = image.load_img('path_to_image.jpg', target_size=(224, 224))
48
+ img_array = image.img_to_array(img)
49
+ img_array = np.expand_dims(img_array, axis=0) / 255.0
50
+
51
+ # Predict
52
+ predictions = model.predict(img_array)
53
+ predicted_class = np.argmax(predictions, axis=1)
54
+
55
+ print(f"Predicted class: {predicted_class}")
56
+ Repository Structure
57
+
58
+ TRASHPRED/
59
+ β”œβ”€β”€ model/
60
+ β”‚ └── trashpred_model.h5
61
+ β”œβ”€β”€ datasets/
62
+ β”‚ β”œβ”€β”€ train/
63
+ β”‚ └── validation/
64
+ β”œβ”€β”€ scripts/
65
+ β”‚ β”œβ”€β”€ train.py
66
+ β”‚ └── evaluate.py
67
+ β”œβ”€β”€ README.md
68
+ πŸ“„ License
69
+ This project is licensed under the MIT License.
70
+
71
+ Author
72
+ Name: Sriram Rampelli
73
+
74
+ For more projects and information, visit Sriram Rampelli's GitHub Profile.