Spaces:
Sleeping
title: 'PolymerOS: Predictive Framework for Polymer Aging'
emoji: π¬
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
pinned: false
license: apache-2.0
PolymerOS: A Computational Framework for Degradation-Aware Plastic Classification
Live Interactive Dashboard | Official Repository
Overview
PolymerOS is the official computational framework for the predictive aging of plastics as described in the manuscript "Predictive Framework to Indicate the Age of Plastics for Proper Recycling."
Conventional mechanical recycling often overlooks the degradation history of materials, leading to inconsistent product quality. This framework utilizes deep learning applied to Raman and FTIR spectroscopy to identify early-stage chemical and physical aging signatures. It provides a standardized, secure, and reproducible environment for the scientific classification of aged versus unaged polymers.
Core Research Artifacts
1. Model Zoo
Verified architectures and weights for the following models are provided:
- Figure2CNN: High-performance binary classifier (Aged vs. Unaged) optimized for spectral data.
- ResNet1D: Benchmarked 1D-convolutional architecture for spectral feature extraction.
- Preprocessing Pipeline: A standardized 4-step sequence including asymmetric least-squares baseline correction, SavitzkyβGolay smoothing, min-max normalization, and resampling to 4000 spectral points.
2. Standalone Scientific Appliance
To facilitate reproducibility and practical use by researchers, the entire pipelineβincluding the interactive dashboard, inference engine, and preprocessing logicβis delivered as a portable OCI container.
Technical Architecture
ml-polymer-recycling/
βββ backend/
β βββ main.py # API entrypoint and static asset server
β βββ models/
β β βββ weights/ # Model binaries (.pth managed via Git LFS)
β βββ utils/
β β βββ model_manager.py # Hardened PyTorch 2.6 safe-loading logic
β β βββ preprocessing.py # Standardized 4-step spectral preprocessing
β βββ service.py # Core inference orchestration
βββ frontend/
β βββ src/ # React/TypeScript source code
β β βββ apiClient.ts # Location-agnostic API Client
β βββ dist/ # Compiled production assets
βββ Dockerfile # Multi-stage hardened OCI build configuration
βββ requirements.txt # Python environment specifications
βββ .gitattributes # Git LFS tracking for model weights
Reproducibility & Local Operation
1. Prerequisites
- Git LFS (Required to download model weight binaries).
- Docker or Podman.
2. Setup
# Clone the official repository
git clone https://github.com/KLab-AI3/ml-polymer-recycling.git
cd ml-polymer-recycling
# Initialize LFS and pull model weights
git lfs install
git lfs pull
3. Running the Dashboard
To ensure bit-perfect scientific parity with the benchmarks reported in the manuscript, we recommend running the framework as a standalone appliance. The container is internally hardened to run in a restricted, read-only state.
# Build the appliance
docker build -t polymer-os .
# Launch the dashboard
docker run -p 7860:7860 polymer-os
The interactive interface will be available at: http://localhost:7860
Security & Agnosticism
- PyTorch 2.6 Enforcement: Models are loaded using the hardened
weights_only=Truestandard to ensure safe execution in public environments. - Environment Aware: The "Agnostic" API client automatically detects host and port settings, ensuring seamless transitions between local workstations and cloud providers like Hugging Face Spaces.
Contributors
- Dhoopshikha Lakshmi Devi Basgeet β Lead Author
- Jaser Hasan β Lead Developer / Technical Audit
- Konpal Raheja
- Divita Mathur
- Dr. Sanmukh Kuppannagari β Corresponding Author
- Dr. Metin Karayilan β Corresponding Author
License
Licensed under the Apache License, Version 2.0 (the "License"); see LICENSE for details.