MCPcopy Index your code
hub / github.com/addyosmani/enhance

github.com/addyosmani/enhance @1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.0.0 ↗ · + Follow
45 symbols 106 edges 41 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Enhance

Enhance Logo

Enhance is an AI-powered image enhancement tool that lets you upscale and improve image quality directly in your browser. Try it out at enhance.addy.ie

Features

  • 🖼️ Multiple Enhancement Models:
  • ESRGAN models for upscaling (2x, 3x, 4x, 8x)
  • MAXIM models for specific enhancements:

    • Deblurring
    • Denoising
    • Low-light enhancement
    • Photo retouching
    • Rain removal
    • Indoor dehazing
  • 🎯 Smart Image Processing:

  • Automatic image size optimization
  • WebGL-aware processing
  • Efficient patch-based processing
  • Progress tracking

  • 🎨 User-Friendly Interface:

  • Drag-and-drop image upload
  • Real-time image preview
  • Interactive size adjustment
  • Aspect ratio lock/unlock
  • One-click download

Technical Details

Models

  • ESRGAN Models:
  • Slim (2.5MB): Fast, lightweight model for general use
  • Medium (5MB): Balanced performance and quality
  • Thick (12MB): High-quality upscaling with better detail preservation
  • Default (2MB): Standard upscaling model

  • MAXIM Models (8MB each):

  • Specialized models for specific image enhancement tasks
  • Optimized for 64x64 patches
  • Automatic input size adjustment

Implementation

  • Built with React and TypeScript
  • Uses TensorFlow.js for model inference
  • WebGL acceleration for processing
  • Efficient memory management
  • Progressive enhancement support

Development

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

Browser Support

Enhance works in modern browsers that support: - WebGL 2.0 - WebAssembly - Modern JavaScript features

License

MIT © Addy Osmani

Acknowledgments

  • ESRGAN for the base super-resolution models
  • MAXIM for the enhancement models
  • TensorFlow.js team for the web ML runtime

Extension points exported contracts — how you extend this code

UpscaleModel (Interface)
(no doc)
src/types.ts
ScaleSelectorProps (Interface)
(no doc)
src/components/ScaleSelector.tsx
ModelType (Interface)
(no doc)
src/types.ts
ModelCardProps (Interface)
(no doc)
src/components/ModelCard.tsx
ModelCategory (Interface)
(no doc)
src/types.ts
ModelSelectorProps (Interface)
(no doc)
src/components/ModelSelector.tsx
ImageState (Interface)
(no doc)
src/types.ts
ImagePreviewProps (Interface)
(no doc)
src/components/ImagePreview.tsx

Core symbols most depended-on inside this repo

loadImage
called by 4
src/utils/image-loader.ts
ensureMultipleOf64
called by 2
src/utils/maxim-preprocessor.ts
preprocessMaximImage
called by 2
src/utils/maxim-preprocessor.ts
isMaximModel
called by 2
src/utils/model-utils.ts
handleWidthChange
called by 1
src/components/ImageResizer.tsx
handleHeightChange
called by 1
src/components/ImageResizer.tsx
initializeModels
called by 1
src/utils/model-loader.ts
getModel
called by 1
src/utils/model-loader.ts

Shape

Function 33
Interface 12

Languages

TypeScript100%

Modules by API surface

src/types.ts5 symbols
src/components/ImageResizer.tsx4 symbols
src/components/ImagePreview.tsx3 symbols
src/components/ImageDropzone.tsx3 symbols
src/utils/upscaler.ts2 symbols
src/utils/model-validator.ts2 symbols
src/utils/model-utils.ts2 symbols
src/utils/model-loader.ts2 symbols
src/utils/maxim-preprocessor.ts2 symbols
src/utils/image-scaling.ts2 symbols
src/utils/image-loader.ts2 symbols
src/components/ScaleSelector.tsx2 symbols

For agents

$ claude mcp add enhance \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact