3dentification

Identifying 3D printing specific plastic types and colors using Near-Infrared Spectroscopy and Computer Vision.

https://github.com/urbanpistek/3dentification

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.5%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

Identifying 3D printing specific plastic types and colors using Near-Infrared Spectroscopy and Computer Vision.

Basic Info
  • Host: GitHub
  • Owner: UrbanPistek
  • License: gpl-3.0
  • Language: C++
  • Default Branch: main
  • Size: 115 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 3 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation

README.md

3dentification

An identification system specific to 3D-printing plastics which combines Near-Infrared (NIR) Spectroscopy and computer vision (CV). See POSTER.png for a detailed visual representation of the project!

Goal: To reliably classify PLA, ABS, PETG, and other common materials used in 3D-printing so they can be sorted by material and colour.

Motivation

3D-printing is a growing industry, and with it comes a growing waste problem. 7.1 MILLION kg of 3D-printed thermoplastics are deposited in landfills every year in the USA alone.

While 3D-printed plastic parts are very easy to recycle when they are reliably sorted, even a few specks of contamination from other plastics can ruin the material properties of the recycled filament and make it impossible to reuse in a 3D-printer.

While solutions exist for industrial-scale 3D-printed waste, hobbyists, libraries, makerspaces, and other smaller users have no choice but to dispose of their test prints, failed prints, and support material in the garbage.

There is one gap creating this persisting problem. While the technology to recycle 3D-printed thermoplastic waste exists, no technology exists to sort it reliably. 3D-printed waste can be any shape, colour, and density, and aren't classified with numeric triangle recycling symbols ("resin identification codes"). As a result, municipal recyclers can't sort out this waste stream, and it ends up in the landfill.

Our interdisciplinary 4th year engineering "capstone design" team (2 mechatronics eng, 1 chemical eng, 1 environmental eng) set out to tackle this problem. We partnered with 3cycle, a local startup and social entreprise working on establishing waste collection and recycling for small-scale 3D-printer users. 3cycle graciously helped fund this project -- many thanks!

The code in this repository runs the NIR spectroscopy plastic material identification sensor we built based on the open-source project Plastic Scanner, the CV sensor for colour identification, and the user interface which controls it all.

Technologies Used

Near-Infrared (NIR) Spectroscopy

This is the science at the core of the plastic scanner. Light in the near end of the infrared spectrum (from .7 to 1.4 micrometers in wavelength) is emitted by LEDs, reflected off the material sample, and measured by a photodiode. Different materials absorb different amounts of each wavelength of light. By measuring 8 different wavelengths in sequence at points of the spectrum where our materials of interest (PLA, ABS, etc) differ significantly, and subtracting signal noise identified with a calibration scan, we can determine with confidence which material is being sensed.

Computer Vision

Using a small USB camera, a live video feed captures the colour of the sample by taking the average RGB colour values of the pixels onscreen, minus a calibration image when no sample was present.

Machine Learning

By collecting samples of known material, scanning them, and labelling that data with the material of the sample, we created a dataset specific to our sensor which we used to train a software model how to classify new, unlabelled samples. By the time the poster was made, the software model could accurately distinguish between PLA and ABS 97% of the time, but by collecting more samples and making our dataset larger, that result reached over 99%.

Languages and Technologies

Python, C++, Arduino, PlatformIO, Open-CV, Scikit-Learn

Credits: Urban Pistek Julia Baribeau Mohammed Abayazeed Maria Fraser-Semenoff

Special thanks to 3cycle founder Jason Amri, the Plastic Scanner team, Velocity Science, advisors Tizazu Mekonnen, Simar Saini, Oscar Nespoli, and Binh Minh Trinh from the Polymers Lab, and Jeff at Accelerated Systems Inc. for making this project possible.

Running the Application

Firmware

Flash the custom firmware onto the development board.

Firmware Documentation

Scripts

Running Python Scripts to Train Models, Generate Plots, GUI, Synthetic data generation and computer vision applications.

Create the python environment & activate it: python3 -m venv venv source venv/bin/activate pip install -r requirements.txt

Scripts Documentation

Owner

  • Name: Urban Pistek
  • Login: UrbanPistek
  • Kind: user
  • Company: Siemens

Mechatronics Engineering Student at the University of Waterloo

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Pistek"
  given-names: "Urban"
title: "3dentification"
version: 1.0.0
doi: 10.5281/zenodo.1234
date-released: 2022-12-14
url: "https://github.com/UrbanPistek/3dentification"

GitHub Events

Total
Last Year

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 30
  • Total Committers: 2
  • Avg Commits per committer: 15.0
  • Development Distribution Score (DDS): 0.2
Past Year
  • Commits: 6
  • Committers: 2
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.167
Top Committers
Name Email Commits
UrbanPistek u****k@g****m 24
Julia Baribeau b****a@g****m 6

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 0
  • Total pull requests: 15
  • Average time to close issues: N/A
  • Average time to close pull requests: about 2 hours
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 15
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • UrbanPistek (14)
  • baribeau (2)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • kafka-python ==2.0.2
rnd/rust/Cargo.lock cargo
  • CoreFoundation-sys 0.1.4
  • IOKit-sys 0.1.5
  • aho-corasick 0.7.20
  • bitflags 1.3.2
  • cfg-if 1.0.0
  • itoa 1.0.6
  • libc 0.2.140
  • libudev 0.3.0
  • libudev-sys 0.1.4
  • mach 0.1.2
  • mach 0.3.2
  • memchr 2.5.0
  • nix 0.24.3
  • pkg-config 0.3.26
  • proc-macro2 1.0.52
  • quote 1.0.25
  • regex 1.7.1
  • regex-syntax 0.6.28
  • ryu 1.0.13
  • serde 1.0.155
  • serde_derive 1.0.155
  • serde_json 1.0.94
  • serialport 4.2.0
  • syn 1.0.109
  • unicode-ident 1.0.8
  • winapi 0.3.9
  • winapi-i686-pc-windows-gnu 0.4.0
  • winapi-x86_64-pc-windows-gnu 0.4.0
rnd/rust/Cargo.toml cargo
rnd/Dockerfile docker
  • python 3.9-alpine build
rnd/plastic-cv/Dockerfile docker
  • python 3.9-alpine build
rnd/plastic-cv/requirements.txt pypi
  • Pillow ==9.3.0
  • contourpy ==1.0.6
  • cycler ==0.11.0
  • fonttools ==4.38.0
  • kiwisolver ==1.4.4
  • matplotlib ==3.6.2
  • numpy ==1.23.4
  • opencv-python ==4.6.0.66
  • packaging ==21.3
  • pandas ==1.5.1
  • pyparsing ==3.0.9
  • python-dateutil ==2.8.2
  • pytz ==2022.6
  • scipy ==1.9.3
  • six ==1.16.0
  • webcolors ==1.12
scripts/requirements.txt pypi
  • Flask ==2.2.3
  • Jinja2 ==3.1.2
  • MarkupSafe ==2.1.2
  • Pillow ==9.3.0
  • Pygments ==2.14.0
  • Werkzeug ==2.2.3
  • asttokens ==2.2.1
  • backcall ==0.2.0
  • click ==8.1.3
  • comm ==0.1.2
  • contourpy ==1.0.6
  • customtkinter ==5.1.2
  • cycler ==0.11.0
  • darkdetect ==0.8.0
  • debugpy ==1.6.6
  • decorator ==5.1.1
  • executing ==1.2.0
  • fonttools ==4.38.0
  • ipykernel ==6.21.2
  • ipython ==8.10.0
  • itsdangerous ==2.1.2
  • jedi ==0.18.2
  • joblib ==1.2.0
  • jupyter_client ==8.0.3
  • jupyter_core ==5.2.0
  • kiwisolver ==1.4.4
  • matplotlib ==3.6.2
  • matplotlib-inline ==0.1.6
  • nest-asyncio ==1.5.6
  • numpy ==1.23.5
  • opencv-python ==4.7.0.72
  • packaging ==21.3
  • pandas ==1.5.2
  • parso ==0.8.3
  • pexpect ==4.8.0
  • pickleshare ==0.7.5
  • platformdirs ==3.0.0
  • prompt-toolkit ==3.0.37
  • protobuf ==4.21.11
  • psutil ==5.9.4
  • ptyprocess ==0.7.0
  • pure-eval ==0.2.2
  • pyparsing ==3.0.9
  • pyserial ==3.5
  • python-dateutil ==2.8.2
  • pytz ==2022.6
  • pyzmq ==25.0.0
  • scikit-learn ==1.2.1
  • scipy ==1.10.1
  • six ==1.16.0
  • stack-data ==0.6.2
  • sv-ttk ==2.4
  • threadpoolctl ==3.1.0
  • tk ==0.1.0
  • tornado ==6.2
  • tqdm ==4.64.1
  • traitlets ==5.9.0
  • wcwidth ==0.2.6
  • webcolors ==1.12