A modern web application that uses AI to remove backgrounds from images with just a few clicks.
- Simple Upload Interface: Drag and drop or click to upload images
- Real-time Processing: See the original and processed images side by side
- AI-Powered: Leverages advanced AI segmentation for accurate background removal
- Responsive Design: Works on desktop and mobile devices
- Frontend: React.js with Tailwind CSS
- API Integration: Axios for API requests
- State Management: React Hooks
- Environment Variables: Vite for environment configuration
- Node.js (v14 or higher)
- npm or yarn
-
Clone the repository
-
Install dependencies:
npm install # or yarn install -
Install axios:
npm i axios -- save -
Create a
.envfile in the directory with the following variables:VITE_MY_API_KEY = "your_api_key_here" VITE_BASE_URL = "https://techhk.aoscdn.com/" -
Start the development server:
npm run dev # or yarn dev
| src/
│ ├── component/
│ │ ├── Home.jsx # Main application component
│ │ ├── ImageUpload.jsx # Image upload interface component
│ │ ├── ImagePreview.jsx # Image preview and comparison component
│ │ └── Loading.jsx # Loading state component
│ ├── utils/ # Utility functions and helpers
│ ├── App.jsx # Root application component
│ ├── main.jsx # Application entry point
│ └── index.css # Global styles
├── .env # Environment variables
└── package.json # Project dependencies and scripts
- Users upload an image through the interface
- The application sends the image to an AI enhancement API
- The application polls the API for the enhanced image
- Once processing is complete, the Background Removed image is displayed alongside the original
The application uses an external AI service for image enhancement. The API communication is handled in FinalImageAPI.js, which:
- Uploads the image to the API
- Retrieves a task ID
- Polls the API until the final image is ready
- Returns the final image URL
VITE_MY_API_KEY: Your API key for the enhancement serviceVITE_BASE_URL: The base URL for the API endpoints
- The API has a maximum retry limit of 20 attempts when polling for results
- Large images may take longer to process
- AnishGane @ 2025