Updated Python demos documentation

This commit is contained in:
esimov
2025-05-03 17:55:11 +03:00
parent 7465ed14de
commit b3002df21e
12 changed files with 41 additions and 35 deletions

0
build.sh Executable file → Normal file
View File

View File

@@ -1,10 +1,10 @@
## Pigo demos running in a Python environment
This directory contains a few real time demos running as shared library (**.so**) in a Python environment. The face detection is done on the Go side but the face detection results are transfered as an array to the Python program. It was intended this way because the Go ecosystem is still missing a cross platform and operating system agnostic webcam library. This dependency issue is partially resolved with the Webassembly (WASM) port of the library.
This directory contains a few real time face detection demos running as shared library (**.so**) in a Python environment. The face detection is done on the Go side, but the detected results are transfered as 1D array over the Python program. It was intended this way because the Go ecosystem is still missing a cross platform and operating system agnostic webcam library. This dependency issue is partially resolved with the Webassembly (WASM) port of the library.
## Requirements
- OpenCV 2
- Python2
- OpenCV2
- Python
## Notice

View File

@@ -1,14 +1,12 @@
## Blink detection demo
This is an example of how to use Pigo for blink detection.
### Requirements
* OpenCV2
* Python2
* Python
### Usage
```bash
$ python2 blinkdet.py
$ python blinkdet.py
```
### Keys:

View File

@@ -1,15 +1,13 @@
## Face detection demo
This is an example of how to use Pigo for face detection as a Python application. There are two examples: one which simply detects the webcam faces and another one which blur out the detected faces.
### Requirements
* OpenCV2
* Python2
* Python
### Usage
```bash
# detect faces
$ python2 demo.py
$ python demo.py
# blur out the detect faces
$ python2 faceblur.py
$ python faceblur.py
```

View File

@@ -5,7 +5,7 @@
#line 1 "cgo-builtin-export-prolog"
#include <stddef.h> /* for ptrdiff_t below */
#include <stddef.h>
#ifndef GO_CGO_EXPORT_PROLOGUE_H
#define GO_CGO_EXPORT_PROLOGUE_H
@@ -40,11 +40,17 @@ typedef long long GoInt64;
typedef unsigned long long GoUint64;
typedef GoInt64 GoInt;
typedef GoUint64 GoUint;
typedef __SIZE_TYPE__ GoUintptr;
typedef size_t GoUintptr;
typedef float GoFloat32;
typedef double GoFloat64;
#ifdef _MSC_VER
#include <complex.h>
typedef _Fcomplex GoComplex64;
typedef _Dcomplex GoComplex128;
#else
typedef float _Complex GoComplex64;
typedef double _Complex GoComplex128;
#endif
/*
static assertion to make sure the file is being used on architecture

View File

@@ -1,14 +1,12 @@
## Facial landmark points detection demo
Python demo for live webcam facial landmark points detection.
### Requirements
* OpenCV2
* Python2
* Python
### Usage
```bash
$ python2 flploc.py
$ python flploc.py
```
### Keys:

View File

@@ -5,7 +5,7 @@
#line 1 "cgo-builtin-export-prolog"
#include <stddef.h> /* for ptrdiff_t below */
#include <stddef.h>
#ifndef GO_CGO_EXPORT_PROLOGUE_H
#define GO_CGO_EXPORT_PROLOGUE_H
@@ -40,11 +40,17 @@ typedef long long GoInt64;
typedef unsigned long long GoUint64;
typedef GoInt64 GoInt;
typedef GoUint64 GoUint;
typedef __SIZE_TYPE__ GoUintptr;
typedef size_t GoUintptr;
typedef float GoFloat32;
typedef double GoFloat64;
#ifdef _MSC_VER
#include <complex.h>
typedef _Fcomplex GoComplex64;
typedef _Dcomplex GoComplex128;
#else
typedef float _Complex GoComplex64;
typedef double _Complex GoComplex128;
#endif
/*
static assertion to make sure the file is being used on architecture

View File

@@ -1,14 +1,12 @@
## Image overlay demo
In this demo we detect a person's eyes and place an overlay mask like sunglasses which can be replaced by pressing the keys documented below.
## Image overlay demo
### Requirements
* OpenCV2
* Python2
* Python
### Usage
```bash
$ python2 puploc.py
$ python puploc.py
```
### Keys:

View File

@@ -1,14 +1,12 @@
## Pupils/eyes localization demo
Python demo for live webcam pupils/eyes localization.
### Requirements
* OpenCV2
* Python2
* Python
### Usage
```bash
$ python2 puploc.py
$ python puploc.py
```
### Keys:

View File

@@ -1,14 +1,12 @@
## Talk detection demo
This demo demonstrates how Pigo's facial landmark points detection capabilities can be used for detecting if a person is talking or not. This method can be used in a variety of fields, like checking if a person is communicating or not.
### Requirements
* OpenCV2
* Python2
* Python
### Usage
```bash
$ python2 talkdet.py
$ python talkdet.py
```
### Keys:

View File

@@ -5,7 +5,7 @@
#line 1 "cgo-builtin-export-prolog"
#include <stddef.h> /* for ptrdiff_t below */
#include <stddef.h>
#ifndef GO_CGO_EXPORT_PROLOGUE_H
#define GO_CGO_EXPORT_PROLOGUE_H
@@ -40,11 +40,17 @@ typedef long long GoInt64;
typedef unsigned long long GoUint64;
typedef GoInt64 GoInt;
typedef GoUint64 GoUint;
typedef __SIZE_TYPE__ GoUintptr;
typedef size_t GoUintptr;
typedef float GoFloat32;
typedef double GoFloat64;
#ifdef _MSC_VER
#include <complex.h>
typedef _Fcomplex GoComplex64;
typedef _Dcomplex GoComplex128;
#else
typedef float _Complex GoComplex64;
typedef double _Complex GoComplex128;
#endif
/*
static assertion to make sure the file is being used on architecture

0
examples/web/capture.py Executable file → Normal file
View File