This project is designed to recognize serial numbers from uploaded images using artificial intelligence. It allows users to upload an image, analyze it, and display identified serial numbers along with their recognition confidence.
A live demo of the project is available at: https://sn-detector.vercel.app/
- Image Upload: Simple drag-and-drop or file selection to upload images.
- Automatic Analysis: Automatically analyzes the uploaded image and extracts serial numbers.
- Flexible Serial Number Format: The format of recognized serial numbers can be customized as needed (e.g., by modifying regular expressions or validation rules).
- Clear Results: Displays identified serial numbers and their confidence levels, along with reasons for invalid findings.
- Upload an image containing serial numbers.
- Click the Analyze Image button.
- Wait for the analysis results:
- Serial numbers and their recognition confidence will be displayed.
- Reasons for invalid findings will also be provided.
The format of serial numbers is defined using a regular expression:
const SN_REGEX = /(serial\s*no\.?)|(s\s*\/\?\s*n\.?)|(serial\s*number)|(serial\s*#)|(sn:?)/i;
If you need to adjust the recognition conditions, you can:
- Modify the regular expression (
SN_REGEX
) to match your desired format. - Adjust the validation rules in the
isValidSN
function based on length, allowed characters, or other criteria.
- React.js: For the frontend application.
- Node.js: For backend processing.
- Azure AI: For image analysis and text extraction.
- Tailwind CSS: For design and styling.
- Clone the repository:
git clone https://github.com/your-repository-url.git
- Install dependencies:
npm install
- Run the application:
npm run dev
- Open the application at http://localhost:3000.
If you need to customize the project, you can:
- Change serial number validation rules in
route.tsx
.
Contributions and suggestions for improvement are welcome! Please create a pull request or open an issue on GitHub.
This project was created to simplify the process of serial number identification and provides sufficient flexibility for customization based on specific requirements.