
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@nodify_at/hailo.js
Advanced tools
High-performance Node.js bindings for Hailo AI acceleration processors (NPU). Run neural network inference with hardware acceleration on Hailo-8 devices.
⚠️ Experimental: This project is in active development and APIs may change.
High-performance Node.js bindings for Hailo AI inference accelerators with real-time object detection and streaming capabilities.
npm install @nodify_at/hailo.js
import { HailoDevice, parseNMS, ModelType } from '@hailo/js';
// Initialize device
const device = new HailoDevice({ debug: true });
// Load model
await device.loadModel({
type: ModelType.YOLOV8,
path: './models/yolov8n.hef',
numClasses: 80
});
// Prepare input (RGB image as Uint8Array)
const input = new Uint8Array(640 * 640 * 3);
// Run inference
const outputs = await device.infer({
'yolov8n/input_layer1': input
});
// Parse detections
const detections = parseNMS(
outputs['yolov8n/yolov8_nms_postprocess'],
80,
{ threshold: 0.5 }
);
console.log(`Found ${detections.length} objects`);
Start a real-time object detection server with WebSocket streaming:
import { LiveDetectionServer } from '@hailo/js/server';
const server = new LiveDetectionServer({
port: 8080,
modelPath: 'yolov8n.hef'
});
await server.start();
// Server available at ws://localhost:8080
Open index.html
in your browser to see live detections with:
Main device interface for inference:
const device = new HailoDevice(options?: DeviceOptions);
// Load a model
await device.loadModel(config: ModelConfig | string);
// Run inference
const outputs = await device.infer(inputs: InferenceInputs);
// Get model info
const info = device.getModelInfo();
// Check if ready
const ready = device.isReady();
// Get performance stats
const stats = device.getPerformanceStats();
// Parse NMS output
const detections = parseNMS(buffer, numClasses, options);
// Filter detections
const people = filterByClasses(detections, ['person']);
const highConf = filterByConfidence(detections, 0.7);
// Calculate IoU
const iou = calculateIoU(det1, det2);
// Group by class
const groups = groupByClass(detections);
Advanced tracking with velocity prediction:
const filter = new TemporalFilter({
iouThreshold: 0.1,
minVisibleFrames: 5,
useVelocityPrediction: true
});
// Process frame
const filtered = filter.processFrame(detections);
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Camera Input │────▶│ Detection Server │────▶│ WebSocket Clients│
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
▼
┌──────────────┐
│ Hailo Device │
└──────────────┘
│
▼
┌──────────────────┐
│ Temporal Filter │
└──────────────────┘
const server = new LiveDetectionServer({
port: 8080,
modelPath: 'custom-model.hef',
camera: {
width: 1920,
height: 1080,
fps: 30
},
detection: {
confidenceThreshold: 0.45,
processEveryNFrames: 2
},
temporal: {
minVisibleFrames: 5,
useVelocityPrediction: true,
classSpecificThresholds: new Map([
[1, { iou: 0.15, confidence: 0.6 }], // person
[3, { iou: 0.1, confidence: 0.55 }] // car
])
}
});
device.on('modelLoaded', ({ config, loadTime }) => {
console.log(`Model loaded in ${loadTime}ms`);
});
device.on('inference', ({ outputs, metrics }) => {
console.log(`Inference took ${metrics.inferenceTime}ms`);
});
device.on('error', (error) => {
console.error('Device error:', error);
});
Built-in performance monitoring:
const stats = device.getPerformanceStats();
console.log(`Average FPS: ${stats.avgFps}`);
console.log(`Average inference: ${stats.avgInferenceTime}ms`);
Check out the /examples
directory for:
Contributions are welcome!
MIT License - see LICENSE for details.
FAQs
High-performance Node.js bindings for Hailo AI acceleration processors (NPU). Run neural network inference with hardware acceleration on Hailo-8 devices.
The npm package @nodify_at/hailo.js receives a total of 0 weekly downloads. As such, @nodify_at/hailo.js popularity was classified as not popular.
We found that @nodify_at/hailo.js demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.