Skip to content

Blogs

Tensorflow.js POC 13: Avatar Generator with Face-API.js

Overview

QuickPOC
Figure 1 Computer Vision in AI

Avatar Generator with Face-API.js

This POC, a consequential POC of face-api.js, regonize the face from camera and find the nearest avatar from thousands avatars generated from avatar generators.

References

Pytorch POC 6: WIFI Indoor Positioning

Project Map of DLC

Overview

This is still a very early stage of POC. With a pre-defined datasets, with many WIFI APP signal strengths data try to prdict the real location of the indoor room.

This might be the first POC try to define our input and output data formats.

Also, this POC also be a high level connector of several different components together since it will leaverage multi factor information to conclude a precise indoor locationing.

When it comes to localization within buildings, a distinction can be made between client-based (Active tracking) and server-based positioning ( Passive tracking + Active tracking as optional). Client-based localization enables determining the position directly on the end user's device (e. g. smartphone). In the case of server-based localization, positioning takes place on a server.

Technologies for Client-Based Indoor Positioning

Client-Based Indoor Positioning Compared: Wi-Fi vs. BLE vs. UWB vs. RFID vs. Ultrasound

Technology Accuracy Range
WIFI <15m <150m
BLE 4 <8m <75m
BLE 5.1 <1m <75m
UWB <30cm <150m
RFID Present detection only <1m

Technologies for Server-Based Indoor Positioning

Server-Based Indoor Positioning Compared: Wi-Fi vs. BLE vs. UWB vs. RFID vs. Ultrasound

Technology Accuracy Range
WIFI <15m <150m
BLE 4 <8m <75m
BLE 5.1 <1m <75m
UWB <30cm <150m
RFID Present detection only <1m
Ultrasound <4m <8m or Wall
Indoor Positioning Technology Comments
Client-Based No server setup. Use existing framework. but, low precision
Server-Based (Passive tracking only) Server only. 3-5 sec delay. Not realtime application
Server-Based (Passive+Active tracking) Need sever+client to get hybrid info for realtime & stable location info

Deeper insights of Client-Based Indoor Positioning

Indoor Positioning Use Cases

Many different use cases.

POC using find3

Git Repo Status Progress Comments
find3 status progress Family=barco
API:Devices by Loc (w 1 mins)

Get info of device='dlc2.barco.com' & family='barco' from find3 server

curl -s -L -XGET "http://dlc1.barco.com:8005/api/v1/location_basic/barco/dlc2.barco.com"
Get WIFI/BT SSID, BSSID, RSSID of the location and device

curl -XGET http://dlc1.barco.com:8005/api/v1/location/barco/dlc2.barco.com

Get all devices within 1 minsfrom family='barco' from find3 server and output it as a table

curl -s -L -XGET "http://dlc1.barco.com:8005/api/v1/by_location/barco?history=1&num_scanners=1" | jq -s '.[] | .locations | .[] |.devices' | jsoncsv -A  | mkexcel | csvcut  -d , -C 5  |csvlook --snifflimit 0  | sudo tee output.txt
Update GPS info of location 'Aris Cube' (device=dlc2.barco.com)

curl -s -L -XPOST "http://dlc1.barco.com:8005/api/v1/gps" -H "Content-Type:application/json" --data-binary '{"f":"Barco","l":"Aris Cube","gps":{"lat":25.01290,"lon":121.46701,"alt":0}}'
Delete family=barco data (Dangersous operation!!! Warning!!!)

 curl -s -L -XDELETE "http://dlc1.barco.com:8005/api/v1/database/barco"

Block diagram of find3

Signal strength (dBm) Expected Quality
-90 Chances of connecting are very low at this level
-80 Unreliable signal strength
-67 Reliable signal strength– the edge of what Cisco considers to be adequate to support Voice over WLAN
-55 Anything down to this level can be considered excellent signal strength.
-30 Maximum signal strength, you are probably standing right next to the access point.

A snapshot of find3 active RSSI & its BSSID, SSID on 2020/08/31 nearby dlc2.barco.com

Rssi Freq Type Algo Rate BSSID SSID
-50 2.412 GHz 802.11n 6 12 E8 D0 FC BF 18 0D ClickShare-Mobile-CX20
-52 5.825 GHz 802.11ac 7 8 04 D4 C4 D3 42 84 ASUS_Automation_5G
-72 5.825 GHz 802.11ac 7 8 E4 AA EA 58 43 93 CX-50-DEMO-RICHEN
-50 2.457 GHz 802.11n 7 12 B0 7F B9 82 03 04 NETGEAR25
-66 2.437 GHz 7 7 F0 1D 2D 5D A9 C0 Barco
-58 5.24 GHz 802.11n 6 8 28 24 FF 69 5B B7 TestRoom_CSE800_mac (5GHz)
-55 2.437 GHz 7 7 F0 1D 2D 5B 54 61 Barco Guest
-61 5.24 GHz 802.11ac 1 8 3C 91 80 84 95 07 ClickShare-HW-UniSee
-71 5.24 GHz 802.11ac 7 8 E4 AA EA 35 04 65 ClickShare-1863551994
-55 2.437 GHz 802.11n 7 12 BE 42 4F CB C3 44 TestRoom-EAP-WinServer
-46 5.785 GHz 6 8 7C 10 C9 61 97 84 TAI-QA-ASUSROG-6E_5G
-49 5.18 GHz 802.11ac 7 8 10 63 C8 97 03 9F TAI_MR08
-58 5.785 GHz 802.11ac 7 8 BC CF 4F CB C3 43 TestRoom-EAP
-63 5.18 GHz 802.11ac 6 8 3C 91 80 84 9C 5D ClickShare-1862300001
-59 5.3 GHz 7 6 F0 1D 2D 5A D5 6F Barco
-57 2.412 GHz 802.11n 7 12 D4 6E 0E 41 61 EA keroro24
-60 5.32 GHz 9 6 F0 1D 2D 5B 54 6E Barco Guest
-68 5.58 GHz 7 6 F0 1D 2D 5A D9 8D BarcoIoT
-55 5.18 GHz 802.11ac 7 8 3C 91 80 84 9C 5F TAI_MR09
-59 5.745 GHz 802.11ac 7 8 E4 AA EA 74 46 FF ClickShare-Mobile-CX50
-53 2.412 GHz 7 7 F0 1D 2D 5A D5 62 BarcoIoT
-69 5.805 GHz 802.11ac 6 8 D4 6E 0E 41 61 E9 keroro5
-62 5.24 GHz 802.11ac 7 8 F8 A2 D6 6E 09 CF TestRoom_CSE200P_mac
-58 5.785 GHz 802.11ac 7 8 BE 43 4F CB C3 45 TestRoom-EAP-WinServer
-73 5.68 GHz 7 6 F0 1D 2D 5C 27 CF
-39 2.447 GHz 802.11n 7 12 2C FD A1 CD 32 38 ASUS
-69 5.765 GHz 802.11ac 7 8 70 2E D9 42 F4 76 MAXHUB-6BF
-56 5.745 GHz 802.11ac 7 8 E4 AA EA 35 21 3F SClickShare-1863551600
-58 5.785 GHz 802.11ac 7 8 BE 43 4F CB C3 44 TestRoom-PSK2
-62 2.412 GHz 802.11n 7 12 E8 D0 FC BF 13 5F ClickShare-1862300251
-59 5.18 GHz 802.11ac 7 8 E4 AA EA 74 2C D3 ClickShare-1863553421
-60 2.452 GHz 802.11n 7 12 04 D4 C4 35 69 E8 ASUS_SQA_JessicaHsu_2.4G
-59 5.18 GHz 802.11ac 7 8 3C 91 80 84 95 D3 ClickShare-MR12
-69 2.412 GHz 1 7 F0 1D 2D 5A D9 82 BarcoIoT
-61 2.412 GHz 802.11n 7 12 BC 30 7E F1 1D 9B ClickShare Audi-1
-61 5.18 GHz 802.11ac 7 8 3C 91 80 84 97 59 ClickShare-1862300078
-60 5.32 GHz 7 6 F0 1D 2D 5B 54 6F
-78 2.437 GHz 802.11n 7 8 02 21 6A F8 2F AF DIRECT-ZWTAICLT24036msZe
-62 5.24 GHz 802.11ac 1 8 02 12 5F 17 67 2F WiCS-2100-72E
-59 2.462 GHz 802.11n 7 12 00 D0 41 DC 13 C8 myvita
-55 5.18 GHz 802.11ac 7 8 3C 91 80 84 9F 25 ClickShare-0716174986
-71 5.18 GHz 802.11ac 7 8 10 63 C8 A7 9E 23 TAI_MR04
-86 5.18 GHz 802.11ac 1 8 10 63 C8 96 FF 87 TAI_MR01
-28 2.427 GHz 802.11n 1 12 7A DA 88 B2 74 EC
-66 2.422 GHz 802.11n 7 12 BC 30 7E DD 3D FE WiPG-1000-78C
-56 5.18 GHz 802.11ac 7 8 F8 A2 D6 8D BF 8F ClickShare-1863550102
-59 5.3 GHz 7 6 F0 1D 2D 5A D5 6D BarcoIoT
-73 5.24 GHz 802.11n 7 8 D8 61 62 8B 1D EF TAI-MR06-Pingtung
-52 5.18 GHz 802.11ac 7 8 12 63 C8 14 92 3B DIRECT-BM
-83 5.68 GHz 7 6 F0 1D 2D 5A CC AE Barco Guest
-81 5.26 GHz 7 6 F0 1D 2D 5D B2 AF
-68 2.437 GHz 802.11n 7 12 BC EE 7B 7D 46 C0
-81 5.745 GHz 802.11ac 7 8 02 12 5F 17 68 8C WiCS-2100-88B
-68 5.58 GHz 7 6 F0 1D 2D 5A D9 8E Barco Guest
-55 2.437 GHz 802.11n 1 12 BE 42 4F CB C3 43 TestRoom-PSK2
-77 5.745 GHz 802.11ac 7 8 02 12 5F 17 66 66 WiCS-2100-665
-52 5.18 GHz 802.11n 7 8 28 24 FF 4D 1B FD ClickShare-1872075087
-82 5.2 GHz 802.11n 1 8 BC 30 7E D9 C3 F4 ClickShare-8000000049
-72 5.18 GHz 802.11ac 7 8 E4 AA EA 74 26 59 CX-50_Service
-71 5.18 GHz 802.11ac 7 8 E8 D0 FC BF 15 D1 Agile 01
-58 5.18 GHz 802.11ac 7 8 3C 91 80 84 95 B3 ClickShare-1862300131
-48 5.745 GHz 802.11ac 7 8 2C FD A1 CD 32 3C ASUS_5G
-47 5.18 GHz 802.11ac 6 8 E4 AA EA 58 45 8B ClickShare-1863552495
-84 5.22 GHz 802.11ac 7 8 3C 91 80 84 98 13 TAI_MR03
-69 5.18 GHz 802.11n 7 8 B8 B7 F1 01 B0 2D ClickShare-1873124000
-45 2.412 GHz 802.11n 1 12 C8 60 00 AC FB 30 ASUS-FA
-64 2.462 GHz 1 7 F0 1D 2D 5C 27 C0
-68 5.58 GHz 7 6 F0 1D 2D 5A D9 8F Barco
-54 2.412 GHz 7 7 F0 1D 2D 5A D5 61 Barco Guest
-64 5.745 GHz 802.11ac 7 8 02 12 5F 17 67 F2 WiCS-2100-LIN
-53 5.2 GHz 802.11ac 9 8 04 D4 C4 35 69 EC ASUS_SQA_JessicaHsu_5G
-64 2.462 GHz 7 7 F0 1D 2D 5C 27 C2 BarcoIoT
-59 5.18 GHz 802.11ac 7 8 F8 A2 D6 8D BF 5D ClickShare-1863550098
-81 5.745 GHz 802.11ac 7 8 02 12 5F 30 00 AC WiCS-2100-0AB
-53 2.462 GHz 802.11n 7 12 00 4E 35 1A C8 60 TAI-ClickShare-WPA2-DFS
-73 5.68 GHz 9 6 F0 1D 2D 5C 27 CD BarcoIoT
-59 5.18 GHz 802.11ac 7 8 F8 A2 D6 8D CB 39 ClickShare-1863550140
-75 5.22 GHz 802.11n 7 8 28 24 FF 5B 05 05 CSE-200-demo
-61 5.18 GHz 802.11ac 7 8 10 63 C8 BF B1 81 ClickShare-1862337967
-80 5.26 GHz 7 6 F0 1D 2D 5D B2 AE Barco Guest
-53 5.18 GHz 802.11ac 1 8 A0 40 A0 82 49 0E QA-test-5G
-51 2.412 GHz 802.11n 7 12 10 63 C8 96 F7 F3 ClickShare-T20
-60 5.32 GHz 7 6 F0 1D 2D 5B 54 6D BarcoIoT
-43 5.22 GHz 7 8 6C CD D6 F5 9D 69 HW_WIFI6E_5G
-52 2.462 GHz 802.11n 7 12 18 31 BF C5 D1 38 SQA_Balloon_24G
-82 5.68 GHz 7 6 F0 1D 2D 5A CC AF Barco
-84 5.745 GHz 802.11ac 7 8 02 12 5F 30 06 4F WiCS-2100-64E
-45 2.437 GHz 7 12 7C 10 C9 61 97 80 TAI-QA-ASUSROG-6E_2.4G
-58 5.18 GHz 802.11ac 7 8 E4 AA EA 58 43 81 ClickShare-1863552454
-75 5.5 GHz 7 6 F0 1D 2D 5D A9 CD BarcoIoT
-75 5.18 GHz 802.11ac 7 8 D8 F3 BC 54 4B 89 ClickShare-1862375851
-43 2.472 GHz 7 12 08 36 C9 2F 78 F5 TAI-QA-NetGear-2.4G
-63 2.412 GHz 802.11n 7 12 3C 91 80 84 9C 91 ClickShare-1862300102
-68 2.412 GHz 6 7 F0 1D 2D 5A D9 80 Barco
-66 2.437 GHz 7 7 F0 1D 2D 5D A9 C2 BarcoIoT
-63 5.5 GHz 802.11ac 7 8 00 4E 35 1A C8 70 TAI-ClickShare-WPA2-DFS

Live demo of find3 passive RSSI of dlc2.barco.com

live demo

PPT

Can't see the following page? Please login to MS office first.

References

U2Net

SOD

SOD (Salient Object Detection) is a topics in deep learning that by given a image, SOD can automatically segmentize the most interested objects of the image without any hints. SOD learns how human see the interested objects by detecting the denisity of feature points and segmentize the most dense parts. So far, U2Net provide a state of art performance.

First results of U2Net

These are the first results of the U2Net on target benchmark images. For the full results can be checked in Chimay-SOD1 and asubset Chimay-SOD2 can be found.

{% include ideal-image-slider/slider.html selector="slider1" %}

Image sliders

In this page, image slider for jekyll and its js code is used for image slider. Also a Jekyll Ideal Image Slider Include Demo shows the possiblity of Ideal Image Slider.

References

Deep Learning Computing CI/CD Framework

Overview

QuickPOC
Figure 1 DevOps with AI

POCs on Small changes from Open Source

  1. Non-GPL license Open source projects are good basements to add value as POC espcially on Deep Learning areas.

POCs on Short but Full Cycle Deployments

  1. Projects use git/yaml script to setup CI/CD pipeline and deployment flows.

  2. Easy to trasnfer from localhost to server via gitlab-runner

Deployments based on Docker/K8s for Scalablity, Portablity

  1. Docker/K8s based deployment for scaiblity, portablity

All POCs setups as a Ecosystem

Live sites

Gitlab server

Git Repo Status Progress Comments
gitlab status progress User=root
gitlab grafana

Current runners

Servers Runner OS tag Monitoring
dlc.dlc.com dlc Ubuntu18.04 dlc, ubuntu, GPU Node GPU
dlc1.dlc.com dlc1 Ubuntu18.04 dlc1, ubuntu, GPU Node GPU
dlc2.dlc.com dlc2 Ubuntu18.04 dlc2, ubuntu Node

How to setup dlc/dlc1 to run a TensorFlow GPU project

with Gitlab runner

Step 1: Add project to Gitlab https://tailab.dlc.com:9443/deeplearningcomputing
Step 1.5: If your project is in https://git.dlc.com/

You will need to import your project for gitlab CI/CD only by add your project into https://tailab.dlc.com:9443/root/git-sync-mirror. After that, bitbucket code will be automatically syced to gitlab server.

Step 2: Enable dlc gitlab runner and setup CI/CD
Step 3: See the CI/CD results

with ssh or RDP + admin account

Step 1: Check with wj.lee@dlc.com and ask for admin account of dlc

Step 2: With ssh or RPD to login to dlc

How to setup your runner- How to install gitlab-runner in your ubuntu

Step 1:

sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64

Step 2:

sudo chmod +x /usr/local/bin/gitlab-runner
Step 3:

sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash

Step 4:

sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start
Step 5.0: Check https://docs.gitlab.com/runner/register/index.html

sudo gitlab-runner register
and register interactively.

or

Step 5.1:

First, by command line for docker gitlab-runner

sudo gitlab-runner register -n --url https://tailab.dlc.com:9443/ --registration-token YOUR-TOKEN --executor docker --description ${HOSTNAME}.dlc.com --tag-list "ubuntu, docker, ${HOSTNAME}" --run-untagged="true" --docker-image "docker:stable" --docker-privileged --tls-ca-file=/etc/gitlab-runner/certs/ssl.csr 

PS: YOUR-TOKEN can be obtained from Gitlab Server, in top menu, Admin Area->Runners to get the registration token. If you have no idea how to get '/etc/gitlab-runner/certs/ssl.csr', please check step XX.

Second, by command line for shell gitlab-runner

sudo gitlab-runner register -n --url https://tailab.dlc.com:9443/ --registration-token YOUR-TOKEN --executor shell --description ${HOSTNAME}.dlc.com --tag-list "ubuntu, shell, ${HOSTNAME}" --run-untagged="true" --tls-ca-file=/etc/gitlab-runner/certs/ssl.csr
If you have no idea how to get '/etc/gitlab-runner/certs/ssl.csr', please check step XX.

Step 6: Allow passwordless sudo

execute

sudo joe /etc/sudoers
, then check and edit/add one line as

gitlab-runner  ALL=(ALL) NOPASSWD: ALL

if no joe command, please install

sudo apt-get install joe

Step 6.1: Modify /etc/gitlab-runner/config.toml

sudo joe /etc/gitlab-runner/config.toml

and change concurrent from 1 to 40 or more. Also, for shell runner, please also add

environment = ["GIT_SSL_NO_VERIFY=true"]

Step 7: Install git-lsf

sudo apt-get -y install git-lfs

Step 8: Verify gitlab-runner

sudo gitlab-runner verify

Step 9:

For ubuntu 20.04, please do this to prevent Gitlab runner shell executor doesn't work on Ubuntu focal

sudo rm /home/gitlab-runner/.bash_logout

Step X: If you want to upgrade gitlab-runner

This is optional step. If you want to upgrae gitlab-runner to newest one. Please do the following commands

1
2
3
4
sudo systemctl stop gitlab-runner.service
sudo curl -L --output /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
sudo systemctl start gitlab-runner.service
sudo systemctl status gitlab-runner.service

Step XX: If you met the problem like below or you have no idea how to get '/etc/gitlab-runner/certs/ssl.csr'

1
2
3
4
ERROR: Registering runner... failed
runner=CtzAuyzs status=couldn't execute POST against https://gitlab.test.com.tw/api/v4/runners: 
Post https://gitlab.test.com.tw/api/v4/runners: x509: certificate signed by unknown authority
PANIC: Failed to register this runner. Perhaps you are having network problems 
then follow the steps below to get self-certification and note the filename is 'ssl.crt'

1
2
3
4
5
6
7
8
SERVER=SERVER=tailab.dlc.com
PORT=9443

CERTIFICATE=/etc/gitlab-runner/certs/ssl.crt

sudo mkdir -p $(dirname "$CERTIFICATE")

openssl s_client -connect ${SERVER}:${PORT} -showcerts </dev/null 2>/dev/null | sed -e '/-----BEGIN/,/-----END/!d' | sudo tee "$CERTIFICATE" >/dev/null
then you get '/etc/gitlab-runner/certs/ssl.crt' you need for gitlab-runner register.

References

Deep Learning Computing wiki

Google Slides presentation in a Jekyll post

1
2
3
4
5
6
7
8
<style>
.responsive-wrap iframe{ max-width: 100%;}
</style>
<div class="responsive-wrap">
<!-- this is the embed code provided by Google -->
  <iframe src="https://docs.google.com/presentation/d/1F0DQTNPg3YG_By6LMGcgwT3icJ3eMhCiupAZm76CIfE/embed?start=false&loop=false&delayms=3000" frameborder="0" width="1024px" height="768px" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>
<!-- Google embed ends -->
</div>

Onedrive Powerpoint presentation in a Jekyll post

1
2
3
4
5
6
7
8
<style>
.responsive-wrap iframe{ max-width: 100%;}
</style>
<div class="responsive-wrap">
<!-- this is the embed code provided by MS -->
<iframe src="https://barcozone-my.sharepoint.com/personal/wj_lee_barco_com/_layouts/15/Doc.aspx?sourcedoc={565a0ed9-b548-42ad-9bcf-0c86c621c369}&amp;action=embedview&amp;wdAr=1.7777777777777777" width="1024px" height="768px" frameborder="0">This is an embedded <a target="_blank" href="https://office.com">Microsoft Office</a> presentation, powered by <a target="_blank" href="https://office.com/webapps">Office</a>.</iframe>
<!-- MS embed ends -->
</div>

References

Recommendation

Overview

DataForecastinAllVision
Figure 1 DataForecast in AI

pinreset and its pin alogirthm

Amplitude Based Recommendation

amplitude user cohort lists

Here gives a demo for amplitude cohort download and query JSON-Server for Amplitude User Cohorts

References

Pytorch POC 2: OpenTTS

Git Repo Status Progress Comments
OpenTTS status progress Pytorch POC #2
mozillatts status progress Pytorch POC #3
MaryTTS status progress Pytorch POC #4

Based on last time keyword spotting topics on Chimay, I even mention items about TTS (text-to-speech) and showed POCs. Here I adopt Opentts to create a API server for speech and later ultrasound generation from Web.

Opentts

In live opentts demo site, you can check the conventional (non-deep learning) speech synthesis (marytts, nanotts) and deep-learning ones (Mozillatts with Tacotron and Tacotron2). Deep-learing ones provide a beeter speech quality. A public MOS test results as below also show similar conclusions.

MOS

Demo wave file as

Demo wave

Swagger API also includes the following:

Opentts swagger

The following diagram is from mozzila project. It shows the whole picture of nature lanaugege iteration with end users. But, of course, it will be a long way to go.

References