Giter Site home page Giter Site logo

habom2310 / people-tracking-with-age-and-gender-detection Goto Github PK

View Code? Open in Web Editor NEW
86.0 7.0 45.0 107.19 MB

A combination between people tracking and age and gender detection

Python 100.00%
age-detection gender-detection people-tracker people-counter

people-tracking-with-age-and-gender-detection's Introduction

People-tracking-with-Age-and-Gender-detection

A combination between people tracking and age and gender detection

alt text

Abstract

  • Combining people tracking with age and gender detection is a good idea for many and many applications in real life scenarios such as caffe store management to gather the information of customers for further analysis, or in/out people control for security purposes in buildings ...
  • This is just a small step of putting the state-of-the-art image processing techniques together.

Method

  • Firstly, faces are detected in the frame using the famous caffe model res10_300x300_ssd_iter_140000.caffemodel.
  • Secondly, age and gender of every person is predicted also using caffe models age_net and gender_net.
  • Each person is then assigned an ID and tracked over time, even when they are out of the frame for not so long (5 seconds), whenever they come back in the frame, their ID will remain the same.
  • A picture of the person is then saved with the information of him/her.

Requirements

pip install requirements.txt

Implementation

python detect_and_tracker.py

Result

References

A great thank to those who have done fantastic work

Notes

  • Inform me in case you have any problem with running the code.
  • Any related idea is welcome at [email protected]

people-tracking-with-age-and-gender-detection's People

Contributors

dependabot[bot] avatar habom2310 avatar jitender46559 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

people-tracking-with-age-and-gender-detection's Issues

Traceback (most recent call last): File "object_tracker.py", line 69, in <module> detections = net.forward() cv2.error: OpenCV(4.0.0) /io/opencv/modules/dnn/src/layers/convolution_layer.cpp:236: error: (-215:Assertion failed) blobs.size() != 0 in function 'getMemoryShapes'

this is the following output :
File "object_tracker.py", line 69, in
detections = net.forward()

cv2.error: OpenCV(4.0.0) /io/opencv/modules/dnn/src/layers/convolution_layer.cpp:236: error: (-215:Assertion failed) blobs.size() != 0 in function 'getMemoryShapes'

how can i resolve this.

PyImageSearch could not be downloaded

ERROR: Could not find a version that satisfies the requirement pyimagesearch (from versions: none)
ERROR: No matching distribution found for pyimagesearch

error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

This is the error

Traceback (most recent call last):
File "object_tracker.py", line 87, in
blob2 = cv2.dnn.blobFromImage(face_img, 1, (227, 227), MODEL_MEAN_VALUES, swapRB=False)
cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:3718: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'

[ WARN:0] terminating async callback

where to get age_net.caffemodel?

Hi,
thanks for your work!
I tried running the file but I got the following:
: error: (-2:Unspecified error) FAILED: fs.is_open(). Can't open i "age_gender_models/age_net.caffemodel" in function 'cv::dnn::ReadProtoFromBinaryFile'
I understand that the age_net.cafeemodel is missingso where can I get it ?

Thanks,

NameError: name 'gender' is not defined

Getting this error:

(base) ariv1-mac:People-tracking-with-Age-and-Gender-detection ariv$ python detect_and_tracker.py
[INFO] loading models...
[INFO] starting video stream...
Traceback (most recent call last):
File "detect_and_tracker.py", line 93, in
overlay_text = "%s, %s" % (gender, age)
NameError: name 'gender' is not defined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.