This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
70 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# Facial-Recognition | ||
A C++ application that can detect faces using cmake as a build system. | ||
|
||
## Remodeling | ||
This project is currently being updated to sport more OpenCV features. To use v1.1, please append `--face-detection` when calling the executable. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,11 @@ | ||
#!/bin/zsh | ||
cmake CMakeLists.txt -S src -B build | ||
#!/bin/bash | ||
rm -rf build | ||
mkdir build | ||
cmake CMakeLists.txt -S src -B build | ||
if [ -f build/FaceDetction]; then | ||
build/FaceDetection $1 | ||
else | ||
cd build | ||
make | ||
./FaceDetection $1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,25 @@ | ||
cmake_minimum_required(VERSION 3.21) | ||
project(FaceDetection LANGUAGES CXX) | ||
|
||
find_package(OpenCV REQUIRED) | ||
set(CMAKE_C_COMPILER "/usr/bin/clang") | ||
set(CMAKE_CXX_COMPILER "/usr/bin/clang++") | ||
|
||
# set( TARGET ${PROJECT_NAME} ) | ||
# set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) | ||
project(FaceDetection LANGUAGES CXX) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
# set(OpenCV_DIR /opt/homebrew/Cellar/opencv/4.8.0_1/include/opencv4) | ||
set(FACE_DETECTION_CONFIGURATION "${PROJECT_SOURCE_DIR}/../assets/deploy.prototxt") | ||
set(FACE_DETECTION_WEIGHTS "${PROJECT_SOURCE_DIR}/../assets/res10_300x300_ssd_iter_140000_fp16.caffemodel") | ||
# set( SOURCE_PATH "${PROJECT_SOURCE_DIR}/src") | ||
# set( INCLUDE_PATH "${PROJECT_SOURCE_DIR}/include") | ||
|
||
# file( GLOB_RECURSE HS "${INCLUDE_PATH}/*.h") | ||
# file( GLOB_RECURSE CPPS "${SOURCE_PATH}/*.cpp") | ||
set(CMAKE_CXX_STANDARD 20) | ||
|
||
add_executable(${PROJECT_NAME} main.cpp) | ||
|
||
find_package(OpenCV REQUIRED) | ||
|
||
# include_directories("/opt/homebrew/Cellar/opencv/4.8.0_1/include/opencv4") | ||
|
||
target_include_directories(${PROJECT_NAME} PUBLIC "include/") | ||
|
||
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS}) | ||
# target_compile_options(${TARGET} PRIVATE -Wall -Wextra -Wshadow -Wconversion -Wsign-conversion -Wunused-parameter -Wno-long-long -pedantic) | ||
|
||
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20) | ||
target_compile_definitions(${PROJECT_NAME} PRIVATE FACE_DETECTION_CONFIGURATION="${FACE_DETECTION_CONFIGURATION}") | ||
target_compile_definitions(${PROJECT_NAME} PRIVATE FACE_DETECTION_WEIGHTS="${FACE_DETECTION_WEIGHTS}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters