Views
No views yet
| Class | Full Name | Refractive Index | Common Uses |
|---|---|---|---|
| HDPE | High-Density Polyethylene | 1.54 | Bottles, containers |
| LDPE | Low-Density Polyethylene | 1.52 | Bags, films |
| PET | Polyethylene Terephthalate | 1.58 | Beverage bottles |
| PP | Polypropylene | 1.49 | Food containers |
| PS | Polystyrene | 1.59 | Foam, packaging |
| PVC | Polyvinyl Chloride | 1.54 | Pipes, packaging |
| PA | Polyamide (Nylon) | 1.53 | Fishing gear |
1import torch
2import torchvision.models as models
3
4# Load model
5model = models.efficientnet_b0(pretrained=False)
6model.features[0][0] = torch.nn.Conv2d(9, 32, kernel_size=3, stride=2, padding=1, bias=False)
7model.classifier = torch.nn.Sequential(
8 torch.nn.Dropout(0.3),
9 torch.nn.Linear(1280, 7)
10)
11
12checkpoint = torch.load("best_model.pth")
13model.load_state_dict(checkpoint['model_state_dict'])
14model.eval()
15
16# Inference
17spectral_data = torch.randn(1, 9, 224, 224)
18with torch.no_grad():
19 outputs = model(spectral_data)
20 predicted = torch.argmax(outputs, dim=1)
21
22classes = ['HDPE', 'LDPE', 'PET', 'PP', 'PS', 'PVC', 'PA']
23polymer_type = classes[predicted.item()]
24print(f"Detected polymer: {polymer_type}")| Metric | Value |
|---|---|
| Accuracy | 86.56% |
| Precision (avg) | 84.2% |
| Recall (avg) | 83.8% |
| F1-Score (avg) | 84.0% |
1@software{aquatrace_polymer_2026,
2 author = {AquaTrace AI Team},
3 title = {AquaTrace AI Polymer Classification Model},
4 year = {2026},
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/Klassy01/aquatrace-ai-polymer-classification}
7}