diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index b6c504251..420f1180b 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-25T02:22:04","documenter_version":"1.1.2"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-26T02:40:54","documenter_version":"1.1.2"}} \ No newline at end of file diff --git a/dev/acknowledgements/index.html b/dev/acknowledgements/index.html index 0027985ea..a26ee462a 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 55d273ab2..e0e94ed14 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 d1acea2e3..8d8438f80 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 6df802988..d22bd49e5 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 c1a0654d9..e19c77a0b 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,16 +1,16 @@ 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 Reactive ───────────── v0.8.3 + Installed StaticArrayInterface ─ v1.4.1 + Installed ArrayInterface ─────── v7.4.11 Installed IfElse ─────────────── v0.1.1 + Installed Static ─────────────── v0.8.8 Installed EllipsisNotation ───── v1.7.0 - Installed StaticArrayInterface ─ v1.4.1 - Installed GtkReactive ────────── v1.0.6 Installed StatsBase ──────────── v0.33.21 + Installed GtkReactive ────────── v1.0.6 Installed IntervalSets ───────── v0.5.4 - Installed Reactive ───────────── v0.8.3 Installed ImageView ──────────── v0.10.15 - Installed Static ─────────────── v0.8.8 - Installed ArrayInterface ─────── v7.4.11 Installed FaceDetection ──────── v1.1.0 Updating `~/work/FaceDetection.jl/FaceDetection.jl/docs/Project.toml` [00808967] ~ FaceDetection v1.1.0 `~/work/FaceDetection.jl/FaceDetection.jl` ⇒ v1.1.0 @@ -36,8 +36,8 @@ IfElse Reactive ArrayInterface -Static ArrayInterface → ArrayInterfaceStaticArraysCoreExt +Static StatsBase StaticArrayInterface StaticArrayInterface → StaticArrayInterfaceOffsetArraysExt @@ -56,6 +56,6 @@ ImageView Images FaceDetection - 21 dependencies successfully precompiled in 32 seconds. 192 already precompiled. + 21 dependencies successfully precompiled in 29 seconds. 192 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 7a6d5bc87..367224654 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/usage/index.html b/dev/usage/index.html index 06f05473d..5e963ba61 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