This is a Next.js project bootstrapped with create-next-app
. This is a project that allows users to upload an image and overlay polygons on the image. The polygons are defined in a JSON file that is also uploaded by the user.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
To use the application, follow these steps:
- Cick on the "Upload Image" button and select an image from your device.
- Click on the "Upload JSON" button and select a JSON file that contains the polygon data. The polygons should be defined as an array of floating point numbers between 0 and 1, where odd-indexed values are the x coordinates and even-indexed values are the y coordinates.
- The polygons will automatically be drawn on the image.
This project is deployed on Railway. You can view the live version of the application at image-with-polygons