From 2319cda643669aed41ef2efcb13d9edc416d5e22 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Wed, 2 Aug 2023 02:27:51 +0000 Subject: [PATCH] build based on 5c2b8cb --- dev/acknowledgements/index.html | 2 +- dev/benchmarking/index.html | 2 +- dev/caveats/index.html | 2 +- dev/examples/index.html | 2 +- dev/index.html | 12 ++++++------ dev/resources/index.html | 2 +- dev/search/index.html | 2 +- dev/usage/index.html | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dev/acknowledgements/index.html b/dev/acknowledgements/index.html index 386f2dd52..e263828b1 100644 --- a/dev/acknowledgements/index.html +++ b/dev/acknowledgements/index.html @@ -1,2 +1,2 @@ -A Few Acknowledgements · FaceDetection Documentation

Acknowledgements

Thank you to:

  • Simon Honberg for the original open-source Python code upon which this repository is largely based. This has provided me with an easy-to-read and clear foundation for the Julia implementation of this algorithm;
  • Michael Jones for (along with Tirta Susilo) suggesting the method for a facelike-ness measure;
  • Mahdi Rezaei for helping me understand the full process of Viola-Jones' object detection;
  • Ying Bi for always being happy to answer questions (which mainly turned out to be a lack of programming knowledge rather than conceptual; also with help from Bing Xue);
  • Mr. H. Lockwood and Mr. D. Peck are Comp. Sci. students who have answered a few questions of mine;
  • Finally, the people in the Julia slack channel, for dealing with many (probably stupid) questions. Just a few who come to mind: Micket, David Sanders, Eric Forgy, Jakob Nissen, and Roel.
+A Few Acknowledgements · FaceDetection Documentation

Acknowledgements

Thank you to:

  • Simon Honberg for the original open-source Python code upon which this repository is largely based. This has provided me with an easy-to-read and clear foundation for the Julia implementation of this algorithm;
  • Michael Jones for (along with Tirta Susilo) suggesting the method for a facelike-ness measure;
  • Mahdi Rezaei for helping me understand the full process of Viola-Jones' object detection;
  • Ying Bi for always being happy to answer questions (which mainly turned out to be a lack of programming knowledge rather than conceptual; also with help from Bing Xue);
  • Mr. H. Lockwood and Mr. D. Peck are Comp. Sci. students who have answered a few questions of mine;
  • Finally, the people in the Julia slack channel, for dealing with many (probably stupid) questions. Just a few who come to mind: Micket, David Sanders, Eric Forgy, Jakob Nissen, and Roel.
diff --git a/dev/benchmarking/index.html b/dev/benchmarking/index.html index e3efdbcec..befd581e9 100644 --- a/dev/benchmarking/index.html +++ b/dev/benchmarking/index.html @@ -7,4 +7,4 @@ CPU: Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz WORD_SIZE: 64 LIBM: libopenlibm - LLVM: libLLVM-9.0.1 (ORCJIT, skylake)

1.6 Update

A few months after the release of Julia 1.6, I did some performance considerations (there are already quite a few nice features that come with 1.6). Now these are the benchmarking results (see benchmark/basic.jl) Language of Implementation | Commit | Run Time in Seconds | Number of Allocations | Memory Usage –- | –- | –- | –- | –- Julia | ??? | 8.165 | 249021919 | 5.01 GiB

+ LLVM: libLLVM-9.0.1 (ORCJIT, skylake)

1.6 Update

A few months after the release of Julia 1.6, I did some performance considerations (there are already quite a few nice features that come with 1.6). Now these are the benchmarking results (see benchmark/basic.jl) Language of Implementation | Commit | Run Time in Seconds | Number of Allocations | Memory Usage –- | –- | –- | –- | –- Julia | ??? | 8.165 | 249021919 | 5.01 GiB

diff --git a/dev/caveats/index.html b/dev/caveats/index.html index 1a86231ba..abe2c4326 100644 --- a/dev/caveats/index.html +++ b/dev/caveats/index.html @@ -5,4 +5,4 @@ julia> classifiers = learn(pos_training_path, neg_training_path, num_classifiers, min_feature_height, max_feature_height, min_feature_width, max_feature_width; scale = true, scale_to = (200, 200)) -julia> ensemble_vote_all(pos_testing_path, classifiers, scale = true, scale_to = (200, 200)) +julia> ensemble_vote_all(pos_testing_path, classifiers, scale = true, scale_to = (200, 200)) diff --git a/dev/examples/index.html b/dev/examples/index.html index 2e2efb37c..f5c95d98a 100644 --- a/dev/examples/index.html +++ b/dev/examples/index.html @@ -58,4 +58,4 @@ # print results println("$(string(correct_faces, "/", num_faces)) ($(correct_faces_percent) %) of positive images were correctly identified.") -println("$(string(correct_non_faces, "/", num_non_faces)) ($(correct_non_faces_percent) %) of positive images were correctly identified.") +println("$(string(correct_non_faces, "/", num_non_faces)) ($(correct_non_faces_percent) %) of positive images were correctly identified.") diff --git a/dev/index.html b/dev/index.html index f27994ae9..6031cf59e 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,15 +1,15 @@ Home · FaceDetection Documentation

Home

This is a Julia implementation of Viola-Jones' Object Detection algorithm. Although there is an OpenCV port in Julia, it seems to be ill-maintained. As this algorithm was created for commercial use, there seem to be few widely-used or well-documented implementations of it on GitHub. The implementation this repository is based off is Simon Hohberg's Pythonic repository, as it seems to be well written (and the most starred Python implementation on GitHub, though this is not necessarily a good measure). Julia and Python alike are easy to read and write in — my thinking was that this would be easy enough to replicate in Julia, except for Pythonic classes, where I would have to use structs (or at least easier to replicate from than, for example, C++ or JS — two other highly-starred repositories.).

Important Note

I implore collaboration. I am an undergraduate student with no formal education in computer science (or computer vision of any form for that matter); I am certain this code can be refined/optimised by better programmers than myself. This package is still maturing, and as such there are some things I would still like to implement. Please, help me out if you like!

How it works

In an over-simplified manner, the Viola-Jones algorithm has some four stages:

  1. Takes an image, converts it into an array of intensity values (i.e., in grey-scale), and constructs an Integral Image, such that for every element in the array, the Integral Image element is the sum of all elements above and to the left of it. This makes calculations easier for step 2.
  2. Finds Haar-like Features from Integral Image.
  3. There is now a training phase using sets of faces and non-faces. This phase uses something called Adaboost (short for Adaptive Boosting). Boosting is one method of Ensemble Learning. There are other Ensemble Learning methods like Bagging, Stacking, &c.. The differences between Bagging, Boosting, Stacking are:
    • Bagging uses equal weight voting. Trains each model with a random drawn subset of training set.
    • Boosting trains each new model instance to emphasize the training instances that previous models mis-classified. Has better accuracy comparing to bagging, but also tends to overfit.
    • Stacking trains a learning algorithm to combine the predictions of several other learning algorithms.

Despite this method being developed at the start of the century, it is blazingly fast compared to some machine learning algorithms, and still widely used.

  1. Finally, this algorithm uses Cascading Classifiers to identify faces. (See page 12 of the original paper for the specific cascade).

For a better explanation, read the paper from 2001, or see the Wikipedia page on this algorithm.

Adding FaceDetection.jl

julia> using Pkg
julia> Pkg.add("FaceDetection") Updating registry at `~/.julia/registries/General.toml` Resolving package versions... - Installed SnoopPrecompile ────── v1.0.3 Installed IfElse ─────────────── v0.1.1 - Installed Static ─────────────── v0.8.8 Installed EllipsisNotation ───── v1.7.0 + Installed Static ─────────────── v0.8.8 + Installed SnoopPrecompile ────── v1.0.3 Installed StaticArrayInterface ─ v1.4.0 Installed Reactive ───────────── v0.8.3 Installed StatsBase ──────────── v0.33.21 - Installed GtkReactive ────────── v1.0.6 Installed ArrayInterface ─────── v7.4.11 + Installed GtkReactive ────────── v1.0.6 Installed IntervalSets ───────── v0.5.4 Installed ImageView ──────────── v0.10.15 Installed FaceDetection ──────── v1.1.0 @@ -39,8 +39,8 @@ SnoopPrecompile Reactive ArrayInterface -ArrayInterface → ArrayInterfaceStaticArraysCoreExt Static +ArrayInterface → ArrayInterfaceStaticArraysCoreExt StatsBase StaticArrayInterface StaticArrayInterface → StaticArrayInterfaceOffsetArraysExt @@ -59,6 +59,6 @@ ImageView Images FaceDetection - 22 dependencies successfully precompiled in 26 seconds. 184 already precompiled. + 22 dependencies successfully precompiled in 35 seconds. 184 already precompiled. 9 dependencies precompiled but different versions are currently loaded. Restart julia to access the new versions - 2 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

Index

+ 2 dependencies errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the packages

Index

diff --git a/dev/resources/index.html b/dev/resources/index.html index f0695fbc2..50349e0d2 100644 --- a/dev/resources/index.html +++ b/dev/resources/index.html @@ -13,4 +13,4 @@ https://www.wikiwand.com/en/List_of_datasets_for_machine-learning_research#/Object_detection_and_recognition https://www.wikiwand.com/en/List_of_datasets_for_machine-learning_research#/Other_images https://www.face-rec.org/databases/ -https://github.com/polarisZhao/awesome-face#-datasets +https://github.com/polarisZhao/awesome-face#-datasets diff --git a/dev/search/index.html b/dev/search/index.html index 30f263731..474e1407a 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · FaceDetection Documentation

Loading search...

    +Search · FaceDetection Documentation

    Loading search...

      diff --git a/dev/usage/index.html b/dev/usage/index.html index fd732ab44..272ef0d51 100644 --- a/dev/usage/index.html +++ b/dev/usage/index.html @@ -39,4 +39,4 @@ integral_image_arr::AbstractArray, top_left::Tuple{Int,Int}, bottom_right::Tuple{Int,Int} -) -> Number

      Arguments

      Returns

      source +) -> Number

      Arguments

      Returns

      source