This is a demo Android application developed in Kotlin that allows users to remove the background from images. The application communicates with a FastAPI backend hosted locally during development.
- Remove background from images seamlessly.
- Minimalist and user-friendly UI.
- Supports communication with a FastAPI backend for processing.
- Android Studio installed on your machine.
- FastAPI backend running locally.
- Basic understanding of Kotlin and Android development.
git clone https://github.com/harimoradiya/Background-Remover-App.git
cd Background-Remover-App- Clone or set up your FastAPI backend.
- Start the FastAPI server:
uvicorn main:app --host 0.0.0.0 --port 8000
- Verify that the backend is running by visiting:
http://127.0.0.1:8000/docs
- Open the project in Android Studio.
- In your app code, configure the base URL to communicate with the backend:
const val BASE_URL = "http://10.0.2.2:8000"
- Build the app in Android Studio.
- Run the app on an emulator or connected device.
- Launch the app on your Android device or emulator.
- Select an image to remove the background.
- The app communicates with the FastAPI backend to process the image.
- Local Emulator Access: Use
10.0.2.2as the IP address in the app to connect to the backend. - Backend URL:
http://10.0.2.2:8000
Ensure CORS is properly configured in your FastAPI backend to allow communication with the Android app:
from fastapi.middleware.cors import CORSMiddleware
app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # Replace "*" with specific domains in production
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)- Frontend: Kotlin, Android
- Backend: FastAPI (Python)
Add screenshots of app here to showcase the UI and functionality.
This project is licensed under the MIT License.
Feel free to contribute, suggest improvements, or report issues by creating a new issue in this repository.
Hari Moradiya



