Upload an image to detect objects
Create an image with identity from a face photo
Kolors Character to keep character developed with Flux
let's you insert your face at the place of chill guy
Javascript implementation of TrustMark watermarking
Transform flat-lay shots into on-model photos
Add invisible watermarks to images
Upload an image and prompt to generate edited images
Modifies the render of your image, at any resolution, freely
Modify an image's background using text description
Use an image to detect objects
Add a watermark to images and detect watermarks
Identify objects in your image
Transformers.js is a JavaScript library designed to integrate AI-powered image processing directly into web applications. It simplifies the process of detecting objects in images and applying transformations, such as adding logos or watermarks, seamlessly. The library leverages modern AI models to deliver accurate and efficient image processing capabilities.
npm install transformers.js
import Transformers from 'transformers.js';
const transformer = new Transformers({
apiKey: 'YOUR_API_KEY',
});
transformer.loadImage('path/to/image.jpg');
transformer.detectObjects();
transformer.addLogo('logo.png', {
position: 'bottom-right',
});
const result = await transformer.saveAs('output.png');
1. What image formats does Transformers.js support?
Transformers.js supports JPEG, PNG, and WEBP formats for both input and output images.
2. Can I customize the logo placement?
Yes, you can customize the logo's position, size, and opacity using the addLogo method parameters.
3. Does Transformers.js handle errors during image upload?
Yes, the library includes error handling for invalid image formats and failed uploads, providing detailed error messages for easy debugging.