
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@nest-excalibur/google-cloud-vision
Advanced tools
Google Cloud Vision module for NestJS framework
npm i @nest-excalibur/google-cloud-vision --save
Import module: GoogleCloudVisionModule
:
Installation
import { GoogleCloudVisionModule } from '@nest-excalibur/google-cloud-vision/lib';
@Module({
imports: [
GoogleCloudVisionModule,
],
})
export class SomeModule {
}
Don't forget to export your google-cloud credentials before start the server.
Inject the GoogleCloudVisionService
in your controller
import { GoogleCloudVisionService } from '@nest-excalibur/google-cloud-vision/lib';
@Controller('some')
export class SomeController {
constructor(
private readonly googleCloudVisionAService: GoogleCloudVisionService,
) {
}
@Get('inspect-image')
@UseInterceptors(
FileInterceptor('image'),
)
async inspectImage(@UploadedFile() imageFile) {
// Fecth the file and get it's buffer.
const imageBuffer = imageFile.buffer;
// Invoke the respective service methods
const text = await this.googleCloudVisionAService.detectText(imageBuffer);
const faces = await this.googleCloudVisionAService.detectFaces(imageBuffer);
const explictContent = await this.googleCloudVisionAService.detectExplicitContent(imageBuffer);
const objects = await this.googleCloudVisionAService.detectMultipleObjects(imageBuffer);
const properties = await this.googleCloudVisionAService.detectProperties(imageBuffer);
return {
text,
faces,
explictContent,
objects,
properties,
};
}
}
Method Name | Description | Parameters |
---|---|---|
detectLabels | Detects labels that are in the image | image-url or buffer |
detectFaces | Detects faces that are in the image | image-url or buffer |
detectProperties | Gets the more representative properties from the image such as the most relevant colors | image-url or buffer |
detectLandMarks | Detects places such as names of buildings, monuments, among other things. | image-url or buffer |
detectLogos | Detects all logos that are in the image | image-url or buffer |
detectExplicitContent | Detect some type of explicit content in the image such as violence, racism, etc. | image-url or buffer |
detectMultipleObjects | Detects all objects that are in the image with their respective ubication polygon coordinates | image-url or buffer |
detectText | Detects all text contained in the image | image-url or buffer |
detectHandwrittenText | Detects get handwritten text in an image | image-url or buffer |
FAQs
Google Cloud Vision module for NestJS framework
The npm package @nest-excalibur/google-cloud-vision receives a total of 0 weekly downloads. As such, @nest-excalibur/google-cloud-vision popularity was classified as not popular.
We found that @nest-excalibur/google-cloud-vision demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.