This repository has been archived by the owner on Jan 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from norkator/Feature/person-detection
Feature/person detection
- Loading branch information
Showing
4 changed files
with
64 additions
and
8 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
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import os | ||
from module import fileutils, person_detection, configparser | ||
from objects import File | ||
|
||
# Configure input image folder | ||
image_folders = [ | ||
os.getcwd() + '/output/person/', | ||
] | ||
|
||
|
||
def app(): | ||
# Image objects stored here | ||
image_file_objects = [] | ||
|
||
# Create image objects | ||
for image_folder in image_folders: | ||
# Check for 'processed' folder existence | ||
fileutils.create_directory(image_folder + 'processed/') | ||
# Process files | ||
for file_name in fileutils.get_camera_image_names(image_folder): | ||
gm_time = fileutils.get_file_create_time(image_folder, file_name) | ||
file = File.File( | ||
image_folder, | ||
file_name, | ||
fileutils.get_file_extension(image_folder, file_name), | ||
fileutils.get_file_create_year(gm_time), | ||
fileutils.get_file_create_month(gm_time), | ||
fileutils.get_file_create_day(gm_time), | ||
fileutils.get_file_create_hour(gm_time), | ||
fileutils.get_file_create_minute(gm_time), | ||
fileutils.get_file_create_second(gm_time) | ||
) | ||
image_file_objects.append(file) | ||
|
||
# Analyze image objects | ||
for image_object in image_file_objects: | ||
try: | ||
person_detection.analyze_image( | ||
image_object, | ||
configparser.app_config()['movetoprocessed'] == 'True' | ||
) | ||
except: | ||
print('') |
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
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import os | ||
|
||
# Paths | ||
person_path = os.getcwd() + '/output/person/' | ||
|
||
|
||
def analyze_image(image_object, bool_move_processed): | ||
print('run...') |