@@ -26,117 +26,44 @@ The objective of this project is to help Police and higher authorities to track
2626In such cases, the ideal approach is to go through CCTV footages and evidences. Again, this can be very time consuming and given the number of people that go missing everyday, it can be a challanage to keep up with it.<br >
2727
2828## Solution (Project's Implementation)
29- ### 1. Registering New Cases
30- The first step is to register a new case. The GUI application is built using <b >PyQT5</b > that allows you to collect all relevant information and store it in database <b >Postgres</b >.
31- > Please ignore the SRK's image. It is just for the sake of project :)
32-
33- ![ New Case Window] ( resources/new_case.PNG )
34-
35- ### 2. Waiting for Users to submit images
36- So far we have only talked about 'how new cases will be registered', the next thing we have to do is to match these registered cases but who do we match it with? This is where ours Users come in. These users are common people like you and me who wants to make a change in the society.<br >
37- The common people will use an application on their mobile to submit photos of people who they think have lost or found begging while keeping them their identity anonymous. The anonymous part is very important because they fear of local <i >Gundas</i > that might create trouble for them.<br >
38- > Mobile Application
39- ![ Mobile Application] ( resources/mobile_application.PNG )
40-
41- > An android Application can also be build and used but I have very little experience in it.
42- ### 3. Matching Cases
43- The next step is to match the case images and user submitted images. To match <b >KNN Algorithm </b > is used.
44- ![ Main Application] ( resources/app_window.PNG )
45-
46- ## How to run
47- #### 1. With Docker (Easy)
48- Prerequisites
49- ```
50- Docker (docker-compose as well)
51- ```
52- ```
53- $ git clone https://github.com/gaganmanku96/Finding-missing-person-using-AI
54- $ cd Finding-missing-person-using-AI
55- $ docker-compose up --build
56- $ cd app
57- $ pip install -r requirements.txt --no-cache-dir
58- $ python login_window.py
59- ```
60- At this point you'll see a window like this
61- ![ Login Window] ( resources/login_screen.PNG )
62-
63- > Default username: admin
64- > Default password: admin
65- >
66- > Login window makes sure that only authenticated can view the registered cases. Each user can only view the cases submitted by him.
67- > NOTE: There is no concpet of superuser.
68-
69- After logging in you'll see the main screen through which you'll be able to submit cases.
70-
71- ##### To run the mobile application:
72- ```
73- $ cd mobile_app
74- ```
75- or (if you are inside app dir)
76- ```
77- $ ../mobile_app
78- ```
79- ```
80- $ python ui.py
81- ```
82- After that you'll see a window like this<br >
83- ![ mobile application] ( resources/mobile_application.PNG )
84-
85- You can this to submit user images or you can create your own mobile app.
86-
87- Once done you'll have to <b >Click on Refresh</b > button on train KNN Model and then on <b >Match</b > to start Matching Images.
88-
89- #### 2. Without Docker (Intermediate)
90- Here are the step you have to do
91- 1 . Install Postgres Database and replace the username and password in config/.env.file
92- 2 . The next step is to run database and make sure it is working.
93- ```
94- $ cd database
95- $ pip install -r requirements.txt
96- $ uvicorn main:app --port 8002
97- ```
98- 3 . Next, the face encoding api
99- ```
100- $ cd face_encoding
101- $ pip install -r requirements.txt
102- $ uvicorn main:app --port 8000
103- ```
104- > If you are using non-conda environment like venv then it might give error while installing dlib library.
105- 4 . Running the application
106- ```
107- $ cd app
108- $ pip install -r requirements.txt
109- $ python login.py
110- ```
111- At this point you'll see a window like this
112- ![ Login Window] ( resources/login_screen.PNG )
113-
114- > Default username: admin
115- > Default password: admin
116- >
117- > Login window makes sure that only authenticated can view the registered cases. Each user can only view the cases submitted by him.
118- > NOTE: There is no concpet of superuser.
119-
120- After logging in you'll see the main screen through which you'll be able to submit cases.
121-
122- ##### To run the mobile application:
123- ```
124- $ cd mobile_app
125- ```
126- or (if you are inside app dir)
127- ```
128- $ ../mobile_app
129- ```
130- ```
131- $ python ui.py
132- ```
133- After that you'll see a window like this<br >
134- ![ mobile application] ( resources/mobile_application.PNG )
135-
136- You can this to submit user images or you can create your own mobile app.
137-
138- Once done you'll have to <b >Click on Refresh</b > button on train KNN Model and then on <b >Match</b > to start Matching Images.
13929
30+ ### 2025 Major Update: Migration to MediaPipe Face Mesh
31+ - The project has migrated from dlib-based facial landmark/encoding to ** MediaPipe Face Mesh** for all facial feature extraction and matching.
32+ - All code and database logic now use MediaPipe landmarks, making the app easier to run and maintain (no dlib dependency).
33+ - Registration and matching flows are updated to use face mesh data (stored as JSON in the database).
34+ - All legacy dlib/face_encoding code and dependencies have been removed.
35+ - The database schema now expects a ` face_mesh ` column (string/JSON) for facial features.
36+ - The app is compatible with Python 3.12+ and the latest Streamlit.
37+
38+ ### Features
39+ - User authentication (with hashed passwords, Streamlit Authenticator)
40+ - Register new missing person cases (with image upload and face mesh extraction)
41+ - Public/mobile submission of potential matches
42+ - Case matching using face mesh features
43+ - Admin/user dashboard for case management
44+
45+
46+ ## How to Run
47+
48+ 1 . Clone the repository and install dependencies:
49+ ``` bash
50+ git clone https://github.com/gaganmanku96/Finding-missing-person-using-AI.git
51+ cd Finding-missing-person-using-AI
52+ pip install -r requirements.txt
53+ ```
54+ 2 . Run the main web app:
55+ ``` bash
56+ streamlit run Home.py
57+ ```
58+ 3 . To use the mobile/public submission app:
59+ ``` bash
60+ streamlit run mobile_app.py
61+ ```
62+
63+ - The database will auto-create on first run (SQLite, file: ` sqlite_database.db ` ).
64+ - Images are stored in the ` resources/ ` folder.
65+
66+ > ** Note:** If you previously used the dlib version, delete any old database files and images, as the schema and features have changed.
14067
14168## What is left?
14269 - [x] Login (Authentication)
@@ -155,3 +82,4 @@ Once done you'll have to <b>Click on Refresh</b> button on train KNN Model and t
15582## Vote of Thanks
15683- Thanks to [ Davis King] ( https://github.com/davisking ) for creating dlib and for providing the trained facial feature
15784 detection and face encoding models used in this project.
85+ - Thanks to the [ MediaPipe] ( https://mediapipe.dev/ ) team for their open-source face mesh solution, now powering this project!
0 commit comments