CoolFace
Apppublic

Sudhir01/photo-to-gcode

sourceHugging Faceupdated 9d agoView on Hugging Face
0likes
App README

Photo to G-Code

A hosted web app: upload a photo, set your stock/bit parameters, and get downloadable roughing + finishing G-code for CNC relief carving. Depth estimation runs via Depth Anything V2 (through Hugging Face Transformers, so no manual checkpoint download is needed - the model downloads automatically the first time it's used).

Anyone with the Space's URL can use it - no local install required on their end.

Speed / hardware notes

  • —The free CPU tier works but depth estimation on CPU takes anywhere from several seconds to under a minute per image, depending on model size and image resolution. The "Small" model (selected by default in the app) is the fastest option.
  • —If you or others will use this regularly and want faster response, Hugging Face Spaces offers paid GPU tiers you can switch to anytime from the Space's Settings tab - no code changes needed.
  • —The Space "sleeps" after a period of inactivity on the free tier and takes a bit to wake back up on the next visit - normal behavior, not a bug.

Files

  • —app.py - the Gradio web app (depth estimation + G-code generation)
  • —carver_core.py - the roughing/finishing G-code generation logic
  • —requirements.txt - Python dependencies for the Space to install