diff --git a/dev/acknowledgements/index.html b/dev/acknowledgements/index.html index 245049660..843ac5718 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 4698b2d7d..79858cf45 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 cd978aad5..ba5a485d0 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 696ea5a95..119f00b0d 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 195555466..a8b904ce0 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,12 +1,12 @@ 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 EllipsisNotation ───── v1.7.0 Installed IfElse ─────────────── v0.1.1 Installed Static ─────────────── v0.8.8 - Installed Reactive ───────────── v0.8.3 - Installed EllipsisNotation ───── v1.7.0 Installed SnoopPrecompile ────── v1.0.3 Installed StaticArrayInterface ─ v1.4.0 + Installed Reactive ───────────── v0.8.3 Installed GtkReactive ────────── v1.0.6 Installed StatsBase ──────────── v0.33.21 Installed ArrayInterface ─────── v7.4.11 @@ -24,7 +24,7 @@ [27996c0f] + GtkReactive v1.0.6 [615f187c] + IfElse v0.1.1 ⌅ [86fae568] ↓ ImageView v0.11.7 ⇒ v0.10.15 -⌅ [8197267c] ↓ IntervalSets v0.7.4 ⇒ v0.5.4 +⌅ [8197267c] ↓ IntervalSets v0.7.5 ⇒ v0.5.4 [d4071afc] - MultiChannelColors v0.1.3 [510215fc] - Observables v0.5.4 [a223df75] + Reactive v0.8.3 @@ -39,13 +39,13 @@ SnoopPrecompile Reactive ArrayInterface -Static ArrayInterface → ArrayInterfaceStaticArraysCoreExt +Static StatsBase StaticArrayInterface StaticArrayInterface → StaticArrayInterfaceOffsetArraysExt -Clustering StaticArrayInterface → StaticArrayInterfaceStaticArraysExt +Clustering EllipsisNotation IntervalSets IntegralArrays @@ -59,6 +59,6 @@ ImageView Images FaceDetection - 22 dependencies successfully precompiled in 34 seconds. 183 already precompiled. + 22 dependencies successfully precompiled in 25 seconds. 183 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 7962886c9..006384d4f 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 d0f0b778e..c6d789493 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 e16f02f03..1c03b3ce8 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