VisionAIre
  • About Nodeflux
  • Visionaire Stream
    • Overview
    • Requirements
      • Credential Keys
      • Tested Hardware
      • Bandwith Requirements
    • Installation Guide
      • Dependencies
      • Simple Installation
      • Advanced Installation
      • Clustering Installation
      • Add-ons Analytics Installation
        • People Attributes Installation
        • Vehicle Attributes Installation
        • OVOD Installation
        • OVIC Installation
        • VM Installation
        • VLM Installation
    • Analytics
      • Face Recognition
        • Additional Information
          • Overview
          • Disclaimer
          • Metrics
          • Testing
      • People Analytics
      • Crowd Estimation
      • PPE Detection
      • License Plate Recognition
      • Vehicle Analytics
      • Water Level Monitoring
        • Camera Guideline
      • Pre-Flood Monitoring
      • Person Smoking Detection
      • Person with Handphone Detection
      • Smoke and Fire Detection
      • Person Using Firearms Detection
      • Vandalism Attempt Recognition
      • ATM Burglary Incident Recognition
      • Road Crash Monitoring
      • People Fighting Recognition
      • Riot Recognition
    • Developer Guide
      • How our APIs work
      • HTTP APIs
      • Websocket
      • Database Structure
    • Changelogs
  • Visionaire Snapshot
    • Overview
    • Requirements
    • Installation Guide
      • Face Searching & Matching
        • Single Node
        • Clustering
      • Helmet Detection
      • Chicken Estimation
      • Face Detection
      • Over Dimension Over Load
      • Frontal License Plate Recognition
    • Analytics
      • Face Searching & Matching
        • Face Enrollment
          • Image Guideline
          • Face and Image Quality Assessment
            • Setup On Premise
            • API
          • Insert / Update / Delete Enrollment
          • Batch Enrollment
      • Helmet Detection
      • Chicken Estimation
      • People Demography
      • Face Detection
      • Over Dimension Over Load
      • License Plate Recognition -Frontal
    • Developer Guide
      • APIs
        • Face Searching & Matching
        • Helmet Detection
        • Chicken Estimation
        • People Demography
        • Face Detection
        • Over Dimension Over Load
        • Frontal License Plate Recognition
      • Vanilla APIs for Face Enrollment
      • Porting Enrollment Database Cluster to Docker
    • Changelogs
  • VisionAIre Dashboard
    • Introduction
    • Add Analytic Assignment
    • Accessing Vanilla Database
    • Connect to Vanilla Websocket
    • Create your own visualization
      • Migration from Old Streamer to New Streamer
      • Drawing Region of Interest
      • Additional Visualization Query
Powered by GitBook
On this page
  • 1. Set Environment Variable
  • 2. Create User-Defined Docker Network & Volumes
  • 3. Run Postgres Container
  • 4. Run Visionaire Docker Snapshot
  • Create Config.yaml

Was this helpful?

Export as PDF
  1. Visionaire Snapshot
  2. Installation Guide
  3. Face Searching & Matching

Single Node

PreviousFace Searching & MatchingNextClustering

Last updated 1 year ago

Was this helpful?

  • GPU Version requires NVidia CUDA backend, you need to install first.

  • Run docker image

1. Set Environment Variable

Run these commands in your Terminal.

export VISIONAIRE_CLOUD_ACCESS_KEY=<your visionaire cloud access key>
export VISIONAIRE_CLOUD_SECRET_KEY=<your visionaire cloud secret key>
export DEPLOYMENT_KEY_SNAPSHOT=<your snapshot deployment key>
export HOST_ADDR=$(ip route get 8.8.8.8 | sed -n '/src/{s/.*src *\([^ ]*\).*/\1/p;q}')

2. Create User-Defined Docker Network & Volumes

Create a user-defined bridge network:

docker network create nf-visionaire

Create docker volumes for postgresdb:

docker volume create postgres-data

3. Run Postgres Container

Create Postgre Container

docker run -it -d -p 5432:5432 \
--name=postgresdb \
--network="nf-visionaire" \
--restart unless-stopped \
-e POSTGRES_PASSWORD=nfvisionaire123 \
-e POSTGRES_DB=nfvisionaire \
-e POSTGRES_USER=postgres \
-e PGDATA=/var/lib/postgresql/data/pgdata \
-v postgres-data:/var/lib/postgresql/data \
postgres:12-alpine

Init new additional DB

docker run -it --rm \
--network="nf-visionaire" \
-e PGPASSWORD=nfvisionaire123 \
postgres:12-alpine \
sh -c 'psql -h postgresdb -U postgres -c "CREATE DATABASE nfv4;" || true'

4. Run Visionaire Docker Snapshot

Select one of installer below:

Run FremisN Services (GPU Version)

docker run --gpus device=0 -it -d -p 4005:4005 \
--env FREMISN_BATCH_SEARCH_MAX_SIZE=1 \
--name fremisn \
--network="nf-visionaire" \
-v <HOST FREMIS-N CONFIG FOLDER>:/config/config.yml
--restart unless-stopped \
nodefluxio/fremis-n:v2.12.20-gpu \
httpserver \
--access-key ${VISIONAIRE_CLOUD_ACCESS_KEY} \
--secret-key ${VISIONAIRE_CLOUD_SECRET_KEY} \
--dk ${DEPLOYMENT_KEY_SNAPSHOT} \
--db-address localhost \
--db-port 5432 \
--db-name nfvisionaire \
--db-username postgres \
--db-password nfvisionaire123 \
--listen-port 4005 \
--listen-port-monitoring 5005 \
--storage postgres \
--config-path /config/config.yml \
--precision=16 \
--verbose 

Notes:

  • After you run the command, please check Create Config.yaml.

  • If you want to change the enrollments count whereas FRemis-N GPU is already running, please shut FRemis-N down > change the enrollments count value in config.yml > start again

  • Single FRemis-N container/instance doesn't support multiple GPU yet. Hence, when you run with --gpus all while the computer utilizes more than 1 GPU, likely it will fail

Run FremisN Services (CPU Version)

docker run -it -d -p 4005:4005 \
--env FREMISN_BATCH_SEARCH_MAX_SIZE=1 \
--name fremisn \
--network="nf-visionaire" \
--restart unless-stopped \
nodefluxio/fremis-n:v2.12.20-cpu \
httpserver \
--access-key ${VISIONAIRE_CLOUD_ACCESS_KEY} \
--secret-key ${VISIONAIRE_CLOUD_SECRET_KEY} \
--dk ${DEPLOYMENT_KEY_SNAPSHOT} \
--db-address postgresdb \
--db-port 5432 \
--db-name nfvisionaire \
--db-username postgres \
--db-password nfvisionaire123 \
--listen-port 4005 \
--listen-port-monitoring 5005 \
--storage postgres \
--verbose \
--max-workers 1
Options
Description

-h,--help

Print this help message and exit

--access-key

Nodeflux access key

--secret-key

Nodeflux secret key

--dk

Deployment Key

--listen-addr

Address to serve REST API

-p,--listen-port

Address to serve REST API

--listen-port-monitoring

Address port of monitoring

--similarity-threshold

Default similarity threshold

--storage

Storage System. The choice is postgres

--db-address

Database Address of Postgres server, if postgres selected

--db-port

Database port of Postgres server, if postgres selected

--db-name

Database name of Postgres server, if postgres selected

--db-username

Database username of Postgres server, if postgres selected

--db-password

Database password of Postgres server, if postgres selected

--partition-start

The starting number of partition set

--partition-end

The ending number of partition set

-v,--verbose

Turn on verbose logging

--max-workers

OPTIONAL, DEFAULT 1 Set the maximum number of extraction workers, can be 0 or positive numbers. If 0 then exctraction workers is disabled.

Create Config.yaml

Please create a folder which later we call it as <HOST FREMIS-N CONFIG FOLDER>--, then create a file named as config.yml inside <HOST FREMIS-N CONFIG FOLDER> with content as follows:

version: "v1"
target_keyspaces : ["fnz","fahri"] 
keyspace-enrollments_num: 
    <keyspace_name>: <maximum_enrollment> 
Options
Descriptions

target_keyspace

choose keyspace that you want to load

keyspace-enrollments_num

USE ONLY IN GPU MODE Pre-allocate number of enrollment in GPU

nvidia-docker
Page cover image