vincenthuynh commited on
Commit
a02e064
Β·
verified Β·
1 Parent(s): 4dc1452

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +70 -0
README.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Garbage Classification Model β€” CS549</title>
7
+ <style>
8
+ body { font-family: Arial, sans-serif; margin: 40px; line-height: 1.6; color: #333; }
9
+ h1 { color: #2c3e50; }
10
+ h2 { color: #34495e; }
11
+ code { background: #f4f4f4; padding: 2px 4px; border-radius: 4px; }
12
+ pre { background: #f9f9f9; padding: 10px; border-left: 3px solid #ccc; }
13
+ ul { margin: 0; padding-left: 20px; }
14
+ </style>
15
+ </head>
16
+ <body>
17
+
18
+ <h1>πŸ—‘οΈ Garbage Classification Model β€” CS549</h1>
19
+
20
+ <p>A Convolutional Neural Network trained to classify garbage images into 7 categories:</p>
21
+ <ul>
22
+ <li>Cardboard</li>
23
+ <li>Glass</li>
24
+ <li>Metal</li>
25
+ <li>Paper</li>
26
+ <li>Plastic</li>
27
+ <li>Trash</li>
28
+ <li>Biodegradable</li>
29
+ </ul>
30
+
31
+ <h2>πŸ” Use Case</h2>
32
+ <p>Automates waste sorting to improve recycling and support eco-friendly efforts. Ideal for educational demos, PoC apps, or smart bins.</p>
33
+
34
+ <h2>🧠 Model Overview</h2>
35
+ <ul>
36
+ <li><strong>Architecture:</strong> CNN (Conv2D, MaxPooling, Dense)</li>
37
+ <li><strong>Input:</strong> 224x224 RGB</li>
38
+ <li><strong>Output:</strong> Probabilities for 7 classes</li>
39
+ <li><strong>Accuracy:</strong> ~92% on validation set</li>
40
+ <li><strong>Extras:</strong> Grad-CAM for explainability</li>
41
+ </ul>
42
+
43
+ <h2>πŸ“¦ How to Use</h2>
44
+ <pre><code>from tensorflow.keras.models import load_model
45
+ from PIL import Image
46
+ import numpy as np
47
+
48
+ model = load_model("GarbageMLModel_CS549.h5")
49
+
50
+ img = Image.open("example.jpg").resize((224, 224))
51
+ img_array = np.expand_dims(np.array(img) / 255.0, axis=0)
52
+
53
+ pred = model.predict(img_array)
54
+ classes = ['cardboard', 'glass', 'metal', 'paper', 'plastic', 'trash', 'biodegradable']
55
+ print("Prediction:", classes[np.argmax(pred)])
56
+ </code></pre>
57
+
58
+ <h2>πŸ“ Files</h2>
59
+ <ul>
60
+ <li><code>GarbageMLModel_CS549.h5</code> – Trained Keras model</li>
61
+ <li><code>label_map.json</code> – Class labels</li>
62
+ </ul>
63
+
64
+ <h2>πŸ‘€ Author</h2>
65
+ <p>Vincent Huynh<br>
66
+ πŸ“§ <a href="mailto:vintendohuynh@gmail.com">vintendohuynh@gmail.com</a><br>
67
+ πŸ”— <a href="#">LinkedIn</a> | πŸ”— <a href="#">GitHub</a></p>
68
+
69
+ </body>
70
+ </html>