Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
AgeGenderDist
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
人工智能
AgeGenderDist
Commits
d9307cb1
Commit
d9307cb1
authored
Jun 25, 2019
by
zhongshangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
bbc0557a
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
405 additions
and
100 deletions
+405
-100
.gitignore
.gitignore
+396
-0
PKG-INFO
AgeGenderDist.egg-info/PKG-INFO
+0
-46
SOURCES.txt
AgeGenderDist.egg-info/SOURCES.txt
+0
-37
dependency_links.txt
AgeGenderDist.egg-info/dependency_links.txt
+0
-1
requires.txt
AgeGenderDist.egg-info/requires.txt
+0
-6
top_level.txt
AgeGenderDist.egg-info/top_level.txt
+0
-1
face_image.pyc
AgeGenderDist/face_image.pyc
+0
-0
face_model.py
AgeGenderDist/face_model.py
+5
-5
face_model.pyc
AgeGenderDist/face_model.pyc
+0
-0
face_preprocess.pyc
AgeGenderDist/face_preprocess.pyc
+0
-0
gender.py
AgeGenderDist/gender.py
+4
-4
helper.pyc
AgeGenderDist/helper.pyc
+0
-0
mtcnn_detector.pyc
AgeGenderDist/mtcnn_detector.pyc
+0
-0
AgeGenderDist-0.1.0.tar.gz
dist/AgeGenderDist-0.1.0.tar.gz
+0
-0
No files found.
.gitignore
0 → 100644
View file @
d9307cb1
# Created by https://www.gitignore.io/api/python,virtualenv,macos,linux,windows,visualstudiocode,vim,emacs,sublimetext,jetbrains,ansible
# Edit at https://www.gitignore.io/?templates=python,virtualenv,macos,linux,windows,visualstudiocode,vim,emacs,sublimetext,jetbrains,ansible
### Ansible ###
*.retry
### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
# directory configuration
.dir-locals.el
### JetBrains ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### JetBrains Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr
# Sonarlint plugin
.idea/sonarlint
### Linux ###
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# celery beat schedule file
celerybeat-schedule
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
### Python Patch ###
.venv/
### Python.VirtualEnv Stack ###
# Virtualenv
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
[Bb]in
[Ii]nclude
[Ll]ib
[Ll]ib64
[Ll]ocal
[Ss]cripts
pyvenv.cfg
pip-selfcheck.json
### SublimeText ###
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# Workspace files are user-specific
*.sublime-workspace
# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project
# SFTP configuration file
sftp-config.json
# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache
# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings
### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
# Temporary
.netrwhist
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
### VirtualEnv ###
# Virtualenv
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
# End of https://www.gitignore.io/api/python,virtualenv,macos,linux,windows,visualstudiocode,vim,emacs,sublimetext,jetbrains,ansible
AgeGenderDist.egg-info/PKG-INFO
deleted
100644 → 0
View file @
bbc0557a
Metadata-Version: 1.1
Name: AgeGenderDist
Version: 0.1.0
Summary: A short description of the project
Home-page: https://github.com/rentingting/AgeGenderDist
Author: rentingting
Author-email: Your address email (eq. you@example.com)
License: BSD
Download-URL: https://github.com/rentingting/AgeGenderDist/tarball/0.1.0
Description: AgeGenderDist
===============================
version number: 0.1.0
author: rentingting
Overview
--------
A short description of the project
Installation / Usage
--------------------
To install use pip:
$ pip install AgeGenderDist
Or clone the repo:
$ git clone https://github.com/rentingting/AgeGenderDist.git
$ python setup.py install
Contributing
------------
TBD
Example
-------
TBD
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
AgeGenderDist.egg-info/SOURCES.txt
deleted
100644 → 0
View file @
bbc0557a
MANIFEST.in
README.md
requirements.txt
setup.cfg
setup.py
AgeGenderDist/__init__.py
AgeGenderDist/face_image.py
AgeGenderDist/face_model.py
AgeGenderDist/face_preprocess.py
AgeGenderDist/gender.py
AgeGenderDist/helper.py
AgeGenderDist/mtcnn_detector.py
AgeGenderDist/noise_sgd.py
AgeGenderDist.egg-info/PKG-INFO
AgeGenderDist.egg-info/SOURCES.txt
AgeGenderDist.egg-info/dependency_links.txt
AgeGenderDist.egg-info/requires.txt
AgeGenderDist.egg-info/top_level.txt
AgeGenderDist/model/model-0000.params
AgeGenderDist/model/model-symbol.json
AgeGenderDist/mtcnn-model/det1-0001.params
AgeGenderDist/mtcnn-model/det1-symbol.json
AgeGenderDist/mtcnn-model/det1.caffemodel
AgeGenderDist/mtcnn-model/det1.prototxt
AgeGenderDist/mtcnn-model/det2-0001.params
AgeGenderDist/mtcnn-model/det2-symbol.json
AgeGenderDist/mtcnn-model/det2.caffemodel
AgeGenderDist/mtcnn-model/det2.prototxt
AgeGenderDist/mtcnn-model/det3-0001.params
AgeGenderDist/mtcnn-model/det3-symbol.json
AgeGenderDist/mtcnn-model/det3.caffemodel
AgeGenderDist/mtcnn-model/det3.prototxt
AgeGenderDist/mtcnn-model/det4-0001.params
AgeGenderDist/mtcnn-model/det4-symbol.json
AgeGenderDist/mtcnn-model/det4.caffemodel
AgeGenderDist/mtcnn-model/det4.prototxt
\ No newline at end of file
AgeGenderDist.egg-info/dependency_links.txt
deleted
100644 → 0
View file @
bbc0557a
AgeGenderDist.egg-info/requires.txt
deleted
100644 → 0
View file @
bbc0557a
mxnet-cu100==1.4.1
scipy==1.2.2
scikit-learn==0.20.3
opencv-python==4.1.0.25
easydict==1.9
scikit-image==0.14.3
AgeGenderDist.egg-info/top_level.txt
deleted
100644 → 0
View file @
bbc0557a
AgeGenderDist
AgeGenderDist/face_image.pyc
deleted
100644 → 0
View file @
bbc0557a
File deleted
AgeGenderDist/face_model.py
View file @
d9307cb1
...
...
@@ -19,23 +19,23 @@ from AgeGenderDist.mtcnn_detector import MtcnnDetector
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'src'
,
'common'
))
import
AgeGenderDist.face_image
import
AgeGenderDist.face_preprocess
from
pkg_resources
import
resource_filename
MODEL_STR
=
resource_filename
(
__name__
,
"model/"
)
def
do_flip
(
data
):
for
idx
in
range
(
data
.
shape
[
0
]):
data
[
idx
,:,:]
=
np
.
fliplr
(
data
[
idx
,:,:])
def
get_model
(
ctx
,
image_size
,
model_str
,
layer
):
_vec
=
model_str
.
split
(
','
)
assert
len
(
_vec
)
==
2
prefix
=
_vec
[
0
]
epoch
=
int
(
_vec
[
1
])
epoch
=
0
prefix
=
MODEL_STR
print
(
'loading'
,
prefix
,
epoch
)
sym
,
arg_params
,
aux_params
=
mx
.
model
.
load_checkpoint
(
prefix
,
epoch
)
all_layers
=
sym
.
get_internals
()
sym
=
all_layers
[
layer
+
'_output'
]
model
=
mx
.
mod
.
Module
(
symbol
=
sym
,
context
=
ctx
,
label_names
=
None
)
#model.bind(data_shapes=[('data', (args.batch_size, 3, image_size[0], image_size[1]))], label_shapes=[('softmax_label', (args.batch_size,))])
model
.
bind
(
data_shapes
=
[(
'data'
,
(
1
,
3
,
image_size
[
0
],
image_size
[
1
]))])
model
.
set_params
(
arg_params
,
aux_params
)
return
model
...
...
AgeGenderDist/face_model.pyc
deleted
100644 → 0
View file @
bbc0557a
File deleted
AgeGenderDist/face_preprocess.pyc
deleted
100644 → 0
View file @
bbc0557a
File deleted
AgeGenderDist/gender.py
View file @
d9307cb1
import
AgeGenderDist.
face_model
from
AgeGenderDist
import
face_model
import
argparse
import
cv2
import
sys
...
...
@@ -41,11 +41,11 @@ def get_age_gender_dist(img_src):
rt_eye
=
points
[
1
]
tmp
=
rt_eye
-
lf_eye
dist
=
math
.
hypot
(
tmp
[
0
],
tmp
[
1
])
model
=
face_model
.
FaceModel
(
args
)
img
=
model
.
get_input
(
img_src
)
gender
,
age
=
model
.
get_ga
(
img
)
return
age
,
gender
,
dist
def
get_gender_age
(
img
):
...
...
@@ -54,7 +54,7 @@ def get_gender_age(img):
gender
,
age
=
model
.
get_ga
(
img
)
return
gender
,
age
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
dirs
=
os
.
listdir
(
args
.
image
)
for
file
in
dirs
:
print
(
'file'
,
file
)
...
...
AgeGenderDist/helper.pyc
deleted
100644 → 0
View file @
bbc0557a
File deleted
AgeGenderDist/mtcnn_detector.pyc
deleted
100644 → 0
View file @
bbc0557a
File deleted
dist/AgeGenderDist-0.1.0.tar.gz
deleted
100644 → 0
View file @
bbc0557a
File deleted
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment