Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2021-208
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2021-208
2021-208
Commits
09c1d60d
Commit
09c1d60d
authored
Sep 27, 2021
by
IT18109290_Fernando W.S.D
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'IT18109290_Dewmal' into 'master'
V1.15 See merge request
!85
parents
def34101
cb444c50
Changes
18
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
85 additions
and
66 deletions
+85
-66
UI/AbnormalBehaviourDetection.html
UI/AbnormalBehaviourDetection.html
+2
-3
UI/Criminal_registration.html
UI/Criminal_registration.html
+2
-5
UI/FaceRecognition.html
UI/FaceRecognition.html
+2
-3
UI/FigureRecognition.html
UI/FigureRecognition.html
+2
-3
UI/ImageEnhancement.html
UI/ImageEnhancement.html
+2
-3
UI/aboutus.html
UI/aboutus.html
+1
-1
UI/app.js
UI/app.js
+12
-1
UI/css/home.css
UI/css/home.css
+1
-1
UI/home.html
UI/home.html
+1
-1
UI/index.html
UI/index.html
+1
-1
UI/intro.html
UI/intro.html
+1
-1
UI/js/app_criminalReg.js
UI/js/app_criminalReg.js
+0
-2
UI/loading.html
UI/loading.html
+3
-2
UI/main.html
UI/main.html
+1
-1
UI/progressBar.html
UI/progressBar.html
+1
-1
UI/results.html
UI/results.html
+1
-1
app.py
app.py
+28
-16
main.js
main.js
+24
-20
No files found.
UI/AbnormalBehaviourDetection.html
View file @
09c1d60d
...
...
@@ -4,7 +4,7 @@
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>
Abnormal Behavior Detection
</title>
<title>
Criminal Investigation
&
Management System
</title>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"assets/favicon.ico"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Varela+Round"
rel=
"stylesheet"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
...
...
@@ -33,8 +33,7 @@
<form
id=
"myform"
>
<div
style=
"text-align: center;"
>
<input
type=
"file"
id=
"upload"
hidden
required
/>
<label
class=
"btn btn-primary"
for=
"upload"
>
Choose
file
</label>
<label
class=
"btn btn-primary"
for=
"upload"
>
Upload
</label>
</div>
</form>
</div>
...
...
UI/Criminal_registration.html
View file @
09c1d60d
...
...
@@ -4,7 +4,7 @@
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>
C
RIMINAL REGISTRATION
</title>
<title>
C
riminal Investigation
&
Management System
</title>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"./assets/favicon.ico"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Varela+Round"
rel=
"stylesheet"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
...
...
@@ -98,10 +98,7 @@
<option
value=
"Motor Vehicle theft"
>
Motor Vehicle theft
</option>
</select>
</div>
<div
class=
"form-input"
style=
"margin-bottom: 8px;"
>
<label
class=
"required"
>
Profile Picture
</label><br>
<input
type=
"file"
id=
"Profile_picture"
multiple
required
/>
</div>
<div
class=
"form-submit"
style=
"margin-left: -13px; margin-top: 1%;"
>
<div
class=
"row"
>
<div
class=
"col"
style=
"border: 10px solid transparent;"
>
...
...
UI/FaceRecognition.html
View file @
09c1d60d
...
...
@@ -4,7 +4,7 @@
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>
Face Recognition
</title>
<title>
Criminal Investigation
&
Management System
</title>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"assets/favicon.ico"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Varela+Round"
rel=
"stylesheet"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
...
...
@@ -32,8 +32,7 @@
<form
id=
"myform"
>
<div
style=
"text-align: center;"
>
<input
type=
"file"
id=
"upload"
hidden
required
/>
<label
class=
"btn btn-primary"
for=
"upload"
>
Choose
file
</label>
<label
class=
"btn btn-primary"
for=
"upload"
>
Upload
</label>
</div>
</form>
</div>
...
...
UI/FigureRecognition.html
View file @
09c1d60d
...
...
@@ -4,7 +4,7 @@
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>
Figure Recognition
</title>
<title>
Criminal Investigation
&
Management System
</title>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"assets/favicon.ico"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Varela+Round"
rel=
"stylesheet"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
...
...
@@ -33,8 +33,7 @@
<form
id=
"myform"
>
<div
style=
"text-align: center;"
>
<input
type=
"file"
id=
"upload"
hidden
required
/>
<label
class=
"btn btn-primary"
for=
"upload"
>
Choose
file
</label>
<label
class=
"btn btn-primary"
for=
"upload"
>
Upload
</label>
</div>
</form>
</div>
...
...
UI/ImageEnhancement.html
View file @
09c1d60d
...
...
@@ -4,7 +4,7 @@
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>
Image Enhancement
</title>
<title>
Criminal Investigation
&
Management System
</title>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"assets/favicon.ico"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Varela+Round"
rel=
"stylesheet"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
...
...
@@ -33,8 +33,7 @@
<form
id=
"myform"
>
<div
style=
"text-align: center;"
>
<input
type=
"file"
id=
"upload"
hidden
required
/>
<label
class=
"btn btn-primary"
for=
"upload"
>
Choose
file
</label>
<label
class=
"btn btn-primary"
for=
"upload"
>
Upload
</label>
</div>
</form>
</div>
...
...
UI/aboutus.html
View file @
09c1d60d
...
...
@@ -6,7 +6,7 @@
<meta
name=
"keywords"
content=
"Our Creative Team"
>
<meta
name=
"description"
content=
""
>
<meta
name=
"page_type"
content=
"np-template-header-footer-from-plugin"
>
<title>
About Us
</title>
<title>
Criminal Investigation
&
Management System
</title>
<link
rel=
"stylesheet"
href=
"css/about.css"
media=
"screen"
>
<link
rel=
"stylesheet"
href=
"css/about1.css"
media=
"screen"
>
<script
class=
"u-script"
type=
"text/javascript"
src=
"js/about.js"
defer=
""
></script>
...
...
UI/app.js
View file @
09c1d60d
...
...
@@ -191,7 +191,7 @@ function startFaceRecognition() {
//today
function
StartFigureRecognition
()
{
fetch
(
`http://127.0.0.1:5000/StartFigureRecognition`
,
{
method
:
'
POS
T
'
,
method
:
'
GE
T
'
,
headers
:
{
'
Content-Type
'
:
'
application/json
'
},
...
...
@@ -199,6 +199,17 @@ function StartFigureRecognition() {
.
then
(
resp
=>
resp
.
json
())
.
then
(
listt
=>
{
console
.
log
(
listt
)
fetch
(
`http://127.0.0.1:5000/SaveFigureData`
,{
method
:
'
POST
'
,
headers
:{
'
Content-Type
'
:
'
application/json
'
},
body
:
JSON
.
stringify
({
'
age
'
:
listt
[
0
],
'
gender
'
:
listt
[
1
]})
}).
then
(
resp
=>
resp
.
json
())
.
then
(
figData
=>
{
console
.
log
(
figData
)
})
})
}
...
...
UI/css/home.css
View file @
09c1d60d
...
...
@@ -137,7 +137,7 @@ h2{
-webkit-backface-visibility
:
hidden
;
backface-visibility
:
hidden
;
text-align
:
center
;
min-height
:
181
px
;
min-height
:
205
px
;
height
:
auto
;
border-radius
:
10px
;
color
:
#fff
;
...
...
UI/home.html
View file @
09c1d60d
...
...
@@ -2,7 +2,7 @@
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Criminal Investigation
&
Management System
</title>
<title>
Criminal Investigation
&
Management System
</title>
<link
rel=
"icon"
href=
"./assets/about/MicrosoftTeams-image3.ico"
type=
"image/x-icon"
>
<link
rel=
'stylesheet'
href=
'https://fonts.googleapis.com/css?family=Montserrat:300,400,700'
><link
rel=
"stylesheet"
href=
"css/home.css"
>
<link
href=
"https://fonts.googleapis.com/css?family=Varela+Round"
rel=
"stylesheet"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel=
"stylesheet"
/>
...
...
UI/index.html
View file @
09c1d60d
...
...
@@ -4,7 +4,7 @@
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
integrity=
"sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w=="
crossorigin=
"anonymous"
referrerpolicy=
"no-referrer"
/>
<title>
progress bar
</title>
<title>
Criminal Investigation
&
Management System
</title>
<link
rel=
"stylesheet"
href=
"css/progressBar.css"
>
</head>
<body>
...
...
UI/intro.html
View file @
09c1d60d
...
...
@@ -2,7 +2,7 @@
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
Intro Page
</title>
<title>
Criminal Investigation
&
Management System
</title>
<link
rel=
"stylesheet"
href=
"css/intro.css"
>
<meta
http-equiv =
"refresh"
content =
"5; url = home.html"
/>
...
...
UI/js/app_criminalReg.js
View file @
09c1d60d
...
...
@@ -8,7 +8,6 @@ const Blood_Group = document.getElementById('Blood_Group')
const
NIC
=
document
.
getElementById
(
'
NIC
'
)
const
Height
=
document
.
getElementById
(
'
Height
'
)
const
Crimes
=
document
.
getElementById
(
'
Crimes
'
)
const
Profile_picture
=
document
.
getElementById
(
'
Profile_picture
'
)
const
fileinput
=
document
.
getElementById
(
'
fileinput
'
)
//Get Criminal Details
...
...
@@ -43,7 +42,6 @@ myform.addEventListener('submit', (e) => {
NIC
:
NIC
.
value
,
Height
:
Height
.
value
,
Crimes
:
Crimes
.
value
,
Profile_picture
:
Profile_picture
.
value
,
fileinput
:
fileinput
.
value
}
...
...
UI/loading.html
View file @
09c1d60d
...
...
@@ -2,7 +2,8 @@
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
loading Page
</title>
<title>
Criminal Investigation
&
Management System
</title>
<link
rel=
"icon"
href=
"./assets/about/MicrosoftTeams-image3.png"
>
<link
rel=
"stylesheet"
href=
"css/loading.css"
>
<meta
http-equiv =
"refresh"
content =
"5; url = intro.html"
/>
...
...
@@ -14,4 +15,4 @@
<div></div>
</div>
</body>
</html>
\ No newline at end of file
</html>
UI/main.html
View file @
09c1d60d
<!DOCTYPE html>
<html
lang=
"en"
>
<title>
Criminal Investigation
</title>
<title>
Criminal Investigation
&
Management System
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<link
rel=
"stylesheet"
href=
"https://www.w3schools.com/w3css/4/w3.css"
>
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"
>
...
...
UI/progressBar.html
View file @
09c1d60d
...
...
@@ -4,7 +4,7 @@
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<link
rel=
"stylesheet"
href=
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
integrity=
"sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w=="
crossorigin=
"anonymous"
referrerpolicy=
"no-referrer"
/>
<title>
progress bar
</title>
<title>
Criminal Investigation
&
Management System
</title>
<link
rel=
"stylesheet"
href=
"../../../%23Downloads/progress%20bar/css/progressBar.css"
>
</head>
<body>
...
...
UI/results.html
View file @
09c1d60d
...
...
@@ -4,7 +4,7 @@
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>
Results
</title>
<title>
Criminal Investigation
&
Management System
</title>
<link
rel=
"icon"
type=
"image/x-icon"
href=
"assets/favicon.ico"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Varela+Round"
rel=
"stylesheet"
/>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
...
...
app.py
View file @
09c1d60d
...
...
@@ -272,7 +272,7 @@ def RunFigureRecognition():
return
jsonify
(
age
,
gender
)
@
app
.
route
(
'/StartFigureRecognition'
,
methods
=
[
'
POS
T'
])
@
app
.
route
(
'/StartFigureRecognition'
,
methods
=
[
'
GE
T'
])
def
StartFigureRecognition
():
from
figure_recognition.ScriptList
import
Script_List
...
...
@@ -286,7 +286,7 @@ def StartFigureRecognition():
def
SaveFigureData
():
age
=
request
.
json
[
'age'
]
gender
=
request
.
json
[
'gender'
]
height
=
request
.
json
[
'height'
]
height
=
5.4
data
=
FigureDetails
(
age
,
gender
,
height
)
db
.
session
.
add
(
data
)
...
...
@@ -308,10 +308,9 @@ class Criminals_details(db.Model):
NIC
=
db
.
Column
(
db
.
Integer
())
Height
=
db
.
Column
(
db
.
Float
())
Crimes
=
db
.
Column
(
db
.
String
(
100
))
Profile_picture
=
db
.
Column
(
db
.
String
(
100
))
fileinput
=
db
.
Column
(
db
.
String
(
250
))
def
__init__
(
self
,
Name
,
Age
,
Gender
,
DOB
,
Address
,
Blood_Group
,
NIC
,
Height
,
Crimes
,
Profile_picture
,
fileinput
):
def
__init__
(
self
,
Name
,
Age
,
Gender
,
DOB
,
Address
,
Blood_Group
,
NIC
,
Height
,
Crimes
,
fileinput
):
self
.
Name
=
Name
self
.
Age
=
Age
self
.
Gender
=
Gender
...
...
@@ -321,14 +320,13 @@ class Criminals_details(db.Model):
self
.
NIC
=
NIC
self
.
Height
=
Height
self
.
Crimes
=
Crimes
self
.
Profile_picture
=
Profile_picture
self
.
fileinput
=
fileinput
class
Criminals_Schema
(
ma
.
Schema
):
class
Meta
:
fields
=
(
'id'
,
'Name'
,
'Age'
,
'Gender'
,
'DOB'
,
'Address'
,
'Blood_Group'
,
'NIC'
,
'Height'
,
'Crimes'
,
'
Profile_picture'
,
'
fileinput'
)
'id'
,
'Name'
,
'Age'
,
'Gender'
,
'DOB'
,
'Address'
,
'Blood_Group'
,
'NIC'
,
'Height'
,
'Crimes'
,
'fileinput'
)
criminals_Schema
=
Criminals_Schema
()
...
...
@@ -348,10 +346,9 @@ def add_Criminals_details():
NIC
=
request
.
json
[
'NIC'
]
Height
=
request
.
json
[
'Height'
]
Crimes
=
request
.
json
[
'Crimes'
]
Profile_picture
=
request
.
json
[
'Profile_picture'
]
fileinput
=
request
.
json
[
'fileinput'
]
criminals_details
=
Criminals_details
(
Name
,
Age
,
Gender
,
DOB
,
Address
,
Blood_Group
,
NIC
,
Height
,
Crimes
,
Profile_picture
,
fileinput
)
criminals_details
=
Criminals_details
(
Name
,
Age
,
Gender
,
DOB
,
Address
,
Blood_Group
,
NIC
,
Height
,
Crimes
,
fileinput
)
db
.
session
.
add
(
criminals_details
)
db
.
session
.
commit
()
...
...
@@ -392,7 +389,6 @@ def update_Criminals_details(id):
NIC
=
request
.
json
[
'NIC'
]
Height
=
request
.
json
[
'Height'
]
Crimes
=
request
.
json
[
'Crimes'
]
Profile_picture
=
request
.
json
[
'Profile_picture'
]
# Assing new values
criminals_details
.
Name
=
Name
...
...
@@ -404,7 +400,6 @@ def update_Criminals_details(id):
criminals_details
.
NIC
=
NIC
criminals_details
.
Height
=
Height
criminals_details
.
Crimes
=
Crimes
criminals_details
.
Profile_picture
=
Profile_picture
db
.
session
.
commit
()
return
criminals_Schema
.
jsonify
(
criminals_details
)
...
...
@@ -443,9 +438,8 @@ class criminal_result(db.Model):
NIC
=
db
.
Column
(
db
.
Integer
())
Height
=
db
.
Column
(
db
.
Integer
())
Crimes
=
db
.
Column
(
db
.
String
(
100
))
Profile_picture
=
db
.
Column
(
db
.
String
(
100
))
def
__init__
(
self
,
Name
,
Age
,
Gender
,
DOB
,
Address
,
Blood_Group
,
NIC
,
Height
,
Crimes
,
Profile_picture
):
def
__init__
(
self
,
Name
,
Age
,
Gender
,
DOB
,
Address
,
Blood_Group
,
NIC
,
Height
,
Crimes
):
self
.
Name
=
Name
self
.
Age
=
Age
self
.
Gender
=
Gender
...
...
@@ -455,7 +449,6 @@ class criminal_result(db.Model):
self
.
NIC
=
NIC
self
.
Height
=
Height
self
.
Crimes
=
Crimes
self
.
Profile_picture
=
Profile_picture
class
criminal_result_schema
(
ma
.
Schema
):
...
...
@@ -470,10 +463,29 @@ criminals_schema = criminal_result_schema(many=True)
@
app
.
route
(
'/GetAllData'
,
methods
=
[
'GET'
])
def
GetAllData
():
abnormalData
=
behavior_details
.
query
.
get
(
1
)
faceRecogData
=
criminal_result
.
query
.
get
(
1
)
figureData
=
FigureDetails
.
query
.
get
(
1
)
figureDataAll
=
FigureDetails
.
query
.
all
()
a
=
0
max1
=
0
for
i
in
figureDataAll
:
if
i
.
id
>
a
:
max1
=
i
.
id
print
(
max1
)
figureData
=
FigureDetails
.
query
.
get
(
max1
)
faceRecogDataAll
=
criminal_result
.
query
.
all
()
b
=
0
max2
=
0
for
i
in
faceRecogDataAll
:
if
i
.
id
>
b
:
max2
=
i
.
id
print
(
max2
)
faceRecogData
=
criminal_result
.
query
.
get
(
max2
)
data1
=
{
'id'
:
abnormalData
.
id
,
'incident_type'
:
abnormalData
.
incident_type
,
'used_weapon'
:
abnormalData
.
used_weapon
,
'detected_time'
:
abnormalData
.
detected_time
}
...
...
main.js
View file @
09c1d60d
...
...
@@ -4,30 +4,34 @@ require('electron-reload')(__dirname)
function
createWindow
()
{
const
mainWindow
=
new
BrowserWindow
({
width
:
1000
,
height
:
800
// width: 1500,
// height: 1000
icon
:
'
./UI/assets/about/MicrosoftTeams-image3.ico
'
})
mainWindow
.
maximize
();
mainWindow
.
loadFile
(
__dirname
+
'
/UI/loading.html
'
)
mainWindow
.
webContents
.
openDevTools
()
let
menu
=
Menu
.
buildFromTemplate
([{
label
:
"
File
"
,
submenu
:
[
{
label
:
'
Get Article
'
},
{
label
:
'
Exit
'
,
click
()
{
app
.
quit
()
}
}
]
},
{
label
:
"
About
"
}
])
Menu
.
setApplicationMenu
(
menu
)
mainWindow
.
setAutoHideMenuBar
(
true
)
// let menu = Menu.buildFromTemplate([{
// label: "File",
// submenu: [
// { label: 'Get Article' },
// {
// label: 'Exit',
// click() {
// app.quit()
// }
// }
// ]
// },
// { label: "About" }
//
// ])
//
// Menu.setApplicationMenu(menu)
}
...
...
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