GithubHelp home page GithubHelp logo

dralexliu / octoprint-pinozcam Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 2.0 116 MB

AI model running on RPi for failure detection

License: GNU Affero General Public License v3.0

Python 77.04% CSS 0.10% JavaScript 13.89% Jinja 8.97%

octoprint-pinozcam's Introduction

OctoPrint-PiNozCam

Join Discord

Introduction

Welcome to the era of edge computing with free failure detection performed directly on your Pi

Device (50% of All Cores for AI) Inference Speed (images / minute)
Raspberry Pi 5 45
Raspberry Pi 4 9
Raspberry Pi 3B 5
PC with Intel i5 10600 260
OrangePi Zero 2/3 9
Raspberry Pi Zero 2 W 3

*The inference speed tests were conducted under the circumstance that 50% of the device's cores were allocated for AI processing, while the remaining 50% of the cores were dedicated to OctoPrint and printing processes.

Unlock advanced 3D printing monitoring with PiNozCam, your go-to solution for AI-powered surveillance — all without any subscription or registration. PiNozCam brings cutting-edge computing to your Raspberry Pi or any old PC/single board computer, ensuring privacy and providing instant failure alerts via Telegram/Discord.

Features include:

  • Fast Inference on Pi Arm CPU/Local Device, 24/7 AI service
  • Instant Telegram/Discord Error Notifications
  • Privacy-first approach with RAM-only data storage
  • No email register/sign up/subscription/Cloud/Ads/Payment
  • Auto Pause/Stop Functionality

Support RPi OS platform (Don’t know❓):

OS platform Buster Bullseye Bookworm
arm64 (x64)
armhf (x32)

⚠️ This plugin supports the OctoPi image . However, I am still working on this plugin on Octo4a and it may be supported in the future versions.

RPi(Boardcom) Intel/AMD CPU AllWinner RockChip RAM
>=512MB

Plugin Setup

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/DrAlexLiu/OctoPrint-PiNozCam/archive/master.zip

Required Hardware Setup

Endoscope Camera

Compatible with most market-available endoscope cameras.

Ensure your camera:

⚠️ Cleaning the camera lens before EACH print is highly recommended for dust removal.

Endoscope camera Bracket

Search and print a nozzle camera bracket for your camera model.

The setup would be like this:

Cellphone

To enable notifications, enter your Telegram bot token and chat ID or Discord Webhook url. Upon configuration and clicking "Save". A welcome message confirms successful setup. An example failure notification will be sent like this:

Software Configuration

Navigate to the PiNozCam tab:

The screenshot:

Key Parameters:

  • Action: Specifies the action PiNozCam should take when a print failure is detected (e.g., notify only, pause print, stop print). Detected failures are displayed in the video stream for 5 seconds, allowing for immediate visual verification.
  • Image Sensitivity: Adjust the sensitivity to ensure accurate detection of print failures. Set the threshold to balance between premature stopping for minor issues and delaying action for significant errors. A starting value of 0.04 or 4% is recommended for optimal balance.
  • Failure Scores Threshold: Define the confidence level at which an anomaly is considered a print failure. This setting helps in reducing false alarms by setting a minimum probability threshold for errors, ensuring that only genuine failures prompt action.
  • Max Failure Count: Specify the number of detections required in Failure Consider Time before PiNozCam takes the configured action. A value above 1 is recommended to avoid false positives.
  • Failure Consider Time (s): Implement a time buffer to focus on recent failures, ignoring older detections that may no longer be relevant. This dynamic consideration helps in adapting to the current state of the print.
  • CPU Speed Control: Offers options for running the CPU at half or full speed. Half speed is recommended.

Initially, stick with the default settings and adjust them gradually to fine-tune performance.

Support

For further discussion and support, please join our Discord channel.

Support my work

I created this plugin in my spare time, so if you have enjoyed using it then please support it’s development!

octoprint-pinozcam's People

Contributors

dralexliu avatar fabricsoul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

octoprint-pinozcam's Issues

PiNozCam Camera View Unchangable

My Camera is mounted "upside-down" but is of course adjustable in Octoprint camera control.

How can this be achieved with PiNozCam and does this matter?

Installation error on octo4a

hey, when installing this plugin I get this error:
ERROR: Could not find a version that satisfies the requirement onnxruntime>=1.15.0 (from octoprint-pinozcam) (from versions: none)
ERROR: No matching distribution found for onnxruntime>=1.15.0

which results in the message: "Installed: Unknown"

I have python 3.10 installed, and from what I can tell, onnx is inly supported up to 3.9

I am using a Samusng Galaxy Note 8 as my device using octo4a

Feature request: max failure messages per print

When a failure is detected I get Telegram messages until the print is stopped. Then my phone gets crazy :-).

I would like to request a limit input field for failure messages per print. E. g. setting this to "5" would only send max. 5 messages within one print job.

There should be a option to switch the limit off. Could be reached by "0" as input value.

Installation Error on pi4

First of thanks for making this! Very excited to try it out. I generally don't love opening issues but I did google as much as I could and can't really find anything about this error. Also python is very much not my wheel house or I would try and dig in further.

Anyway I am trying to install it via the plugin manager and getting the following error on a pi4

`Installing plugin "OctoPrint-PiNozCam" from https://github.com/DrAlexLiu/OctoPrint-PiNozCam/archive/master.zip...
/home/pi/oprint/bin/python3 -m pip --disable-pip-version-check install file:///tmp/tmpt9vqio7l/OctoPrint-PiNozCam-master.zip --no-cache-dir

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Processing /tmp/tmpt9vqio7l/OctoPrint-PiNozCam-master.zip

ERROR: onnxruntime-1.16.0-cp39-cp39-linux_armv7l.whl is not a supported wheel on this platform.

Error!
Could not parse output from pip, see plugin_pluginmanager_console.log for generated output`

100% CPU on Pi 4 8Gb leads to bulbs while printing

I installed the plugin on my Pi 4 8 Gb running

Linux octopi 6.1.21-v7l+ #1642 SMP Mon Apr  3 17:22:30 BST 2023 armv7l
OctoPrint version : 1.9.3
OctoPi version    : 1.0.0
PiNozCam (1.0.0)

I used the recomended settings for Pi 4 but the system gets to 100% CPU each time the snapshot is taken. This leads to pauses in the print head´s movement. At each pause the suface of the print gets a bulb.

When I disable the plugin the surface of the print is smooth again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.