1.0.17 • Published 8 months ago
kshop-screen-capture-checker v1.0.17
KShop Screen Capture Checker
A Node.js module that uses TensorFlow.js to classify screen captures as "kshop" or "other" using a pre-trained deep learning model.
Features
✅ Loads a trained TensorFlow model from a local directory.
✅ Processes images and makes predictions.
✅ Supports handling errors gracefully.
Usage
import { KShopScreenCaptureChecker } from "./KShopScreenCaptureChecker";
import * as fs from "fs";
async function main() {
const checker = new KShopScreenCaptureChecker();
await checker.init();
// Read an image file
const imageBuffer = fs.readFileSync("example.jpg");
// Predict the result
const result = await checker.predict(imageBuffer);
console.log("Prediction:", result);
}
main();Expected Prediction Output
- "kshop" – If the image matches the KShop pattern.
- "other" – If the image does not match.
- "error" – If an error occurs during prediction.