This project is a simple web application built with Go and the Fiber framework that performs Optical Character Recognition (OCR) on uploaded images using the gosseract
library.
- Upload an image file
- Perform OCR on the uploaded image
- Return the extracted text as a JSON response
- Go 1.20 or later
- Fiber v2.38.0
- gosseract v2.3.0
-
Clone the repository:
git clone /~https://github.com/kishyassin/OCR-in-GO-Fiber.git cd OCR-in-GO-Fiber
-
Install the dependencies:
go mod tidy
-
Run the application:
go run main.go
-
The application will start on port 3000. You can upload an image file to the
/upload
endpoint using a tool likecurl
or Postman.Example using
curl
:curl -X POST http://localhost:3000/upload -F "file=@path/to/your/image.png"
-
The server will respond with the extracted text in JSON format.
This project is licensed under the MIT License. See the LICENSE file for details.