Browse Source

July 20: [ADD] Initial commit 'pos_face_recognition'

pull/254/merge
RisvanaCybro 9 months ago
parent
commit
8b77a50402
  1. 46
      pos_face_recognition/README.rst
  2. 25
      pos_face_recognition/__init__.py
  3. 52
      pos_face_recognition/__manifest__.py
  4. 22
      pos_face_recognition/controllers/__init__.py
  5. 38
      pos_face_recognition/controllers/pos_face_recognition.py
  6. 7
      pos_face_recognition/doc/RELEASE_NOTES.md
  7. 22
      pos_face_recognition/models/__init__.py
  8. 31
      pos_face_recognition/models/hr_employee.py
  9. BIN
      pos_face_recognition/static/description/assets/icons/check.png
  10. BIN
      pos_face_recognition/static/description/assets/icons/chevron.png
  11. BIN
      pos_face_recognition/static/description/assets/icons/cogs.png
  12. BIN
      pos_face_recognition/static/description/assets/icons/consultation.png
  13. BIN
      pos_face_recognition/static/description/assets/icons/ecom-black.png
  14. BIN
      pos_face_recognition/static/description/assets/icons/education-black.png
  15. BIN
      pos_face_recognition/static/description/assets/icons/hotel-black.png
  16. BIN
      pos_face_recognition/static/description/assets/icons/license.png
  17. BIN
      pos_face_recognition/static/description/assets/icons/lifebuoy.png
  18. BIN
      pos_face_recognition/static/description/assets/icons/logo.png
  19. BIN
      pos_face_recognition/static/description/assets/icons/manufacturing-black.png
  20. BIN
      pos_face_recognition/static/description/assets/icons/pos-black.png
  21. BIN
      pos_face_recognition/static/description/assets/icons/puzzle.png
  22. BIN
      pos_face_recognition/static/description/assets/icons/restaurant-black.png
  23. BIN
      pos_face_recognition/static/description/assets/icons/service-black.png
  24. BIN
      pos_face_recognition/static/description/assets/icons/trading-black.png
  25. BIN
      pos_face_recognition/static/description/assets/icons/training.png
  26. BIN
      pos_face_recognition/static/description/assets/icons/update.png
  27. BIN
      pos_face_recognition/static/description/assets/icons/user.png
  28. BIN
      pos_face_recognition/static/description/assets/icons/wrench.png
  29. BIN
      pos_face_recognition/static/description/assets/misc/categories.png
  30. BIN
      pos_face_recognition/static/description/assets/misc/check-box.png
  31. BIN
      pos_face_recognition/static/description/assets/misc/compass.png
  32. BIN
      pos_face_recognition/static/description/assets/misc/corporate.png
  33. BIN
      pos_face_recognition/static/description/assets/misc/customer-support.png
  34. BIN
      pos_face_recognition/static/description/assets/misc/cybrosys-logo.png
  35. BIN
      pos_face_recognition/static/description/assets/misc/features.png
  36. BIN
      pos_face_recognition/static/description/assets/misc/logo.png
  37. BIN
      pos_face_recognition/static/description/assets/misc/pictures.png
  38. BIN
      pos_face_recognition/static/description/assets/misc/pie-chart.png
  39. BIN
      pos_face_recognition/static/description/assets/misc/right-arrow.png
  40. BIN
      pos_face_recognition/static/description/assets/misc/star.png
  41. BIN
      pos_face_recognition/static/description/assets/misc/support.png
  42. BIN
      pos_face_recognition/static/description/assets/misc/whatsapp.png
  43. BIN
      pos_face_recognition/static/description/assets/modules/l1.png
  44. BIN
      pos_face_recognition/static/description/assets/modules/l2.png
  45. BIN
      pos_face_recognition/static/description/assets/modules/l3.png
  46. BIN
      pos_face_recognition/static/description/assets/modules/l4.png
  47. BIN
      pos_face_recognition/static/description/assets/modules/l5.png
  48. BIN
      pos_face_recognition/static/description/assets/modules/l6.png
  49. BIN
      pos_face_recognition/static/description/assets/screenshots/1.png
  50. BIN
      pos_face_recognition/static/description/assets/screenshots/2.png
  51. BIN
      pos_face_recognition/static/description/assets/screenshots/3.png
  52. BIN
      pos_face_recognition/static/description/assets/screenshots/4.png
  53. BIN
      pos_face_recognition/static/description/assets/screenshots/5.png
  54. BIN
      pos_face_recognition/static/description/assets/screenshots/6.png
  55. BIN
      pos_face_recognition/static/description/assets/screenshots/7.png
  56. BIN
      pos_face_recognition/static/description/assets/screenshots/8.png
  57. BIN
      pos_face_recognition/static/description/assets/screenshots/hero.gif
  58. BIN
      pos_face_recognition/static/description/banner.png
  59. BIN
      pos_face_recognition/static/description/icon.png
  60. 635
      pos_face_recognition/static/description/index.html
  61. 140
      pos_face_recognition/static/src/js/LoginScreen.js
  62. 1
      pos_face_recognition/static/src/js/face-api.min.js
  63. BIN
      pos_face_recognition/static/src/js/weights/age_gender_model-shard1
  64. 618
      pos_face_recognition/static/src/js/weights/age_gender_model-weights_manifest.json
  65. BIN
      pos_face_recognition/static/src/js/weights/face_expression_model-shard1
  66. 606
      pos_face_recognition/static/src/js/weights/face_expression_model-weights_manifest.json
  67. BIN
      pos_face_recognition/static/src/js/weights/face_landmark_68_model-shard1
  68. 691
      pos_face_recognition/static/src/js/weights/face_landmark_68_model-weights_manifest.json
  69. BIN
      pos_face_recognition/static/src/js/weights/face_landmark_68_tiny_model-shard1
  70. 397
      pos_face_recognition/static/src/js/weights/face_landmark_68_tiny_model-weights_manifest.json
  71. BIN
      pos_face_recognition/static/src/js/weights/face_recognition_model-shard1
  72. 6
      pos_face_recognition/static/src/js/weights/face_recognition_model-shard2
  73. 1462
      pos_face_recognition/static/src/js/weights/face_recognition_model-weights_manifest.json
  74. BIN
      pos_face_recognition/static/src/js/weights/mtcnn_model-shard1
  75. 402
      pos_face_recognition/static/src/js/weights/mtcnn_model-weights_manifest.json
  76. BIN
      pos_face_recognition/static/src/js/weights/ssd_mobilenetv1_model-shard1
  77. 137
      pos_face_recognition/static/src/js/weights/ssd_mobilenetv1_model-shard2
  78. 1936
      pos_face_recognition/static/src/js/weights/ssd_mobilenetv1_model-weights_manifest.json
  79. BIN
      pos_face_recognition/static/src/js/weights/tiny_face_detector_model-shard1
  80. 273
      pos_face_recognition/static/src/js/weights/tiny_face_detector_model-weights_manifest.json
  81. 36
      pos_face_recognition/static/src/xml/LoginScreen.xml
  82. 14
      pos_face_recognition/views/hr_employee_view.xml

46
pos_face_recognition/README.rst

@ -0,0 +1,46 @@
.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
Pos Face Recognition
====================
This module helps you to login pos session by face recognition
Configuration
=============
* No additional configuration required
Company
-------
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__
License
-------
General Public License, Version 3 (LGPL v3).
(http://www.gnu.org/licenses/lgpl-3.0-standalone.html)
Credits
-------
Developer: (V15) Bhagyadev KP
Contact: odoo@cybrosys.com
Contacts
--------
* Mail Contact : odoo@cybrosys.com
* Website : https://cybrosys.com
Bug Tracker
-----------
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported.
Maintainer
==========
.. image:: https://cybrosys.com/images/logo.png
:target: https://cybrosys.com
This module is maintained by Cybrosys Technologies.
For support and more information, please visit `Our Website <https://cybrosys.com/>`__
Further information
===================
HTML Description: `<static/description/index.html>`__

25
pos_face_recognition/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Bhagyadev KP (<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from . import controllers
from . import models

52
pos_face_recognition/__manifest__.py

@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Bhagyadev KP (<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
{
'name': 'Pos Face Recognition',
'version': '15.0.1.0.0',
'category': 'Point of Sales,Productivity',
'summary': 'User can login pos session by face recognition method',
'description': 'User can login pos session by face recognition '
'method.If any unauthorized login is detected a warning '
'message is arise.',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',
'website': 'https://www.cybrosys.com',
'depends': ['point_of_sale', 'pos_hr'],
'data': [
'views/hr_employee_view.xml'
],
'assets': {
'point_of_sale.assets': [
'pos_face_recognition/static/src/js/face-api.min.js',
'pos_face_recognition/static/src/js/LoginScreen.js',
],
'web.assets_qweb': [
'pos_face_recognition/static/src/xml/**/*',
],
},
'images': ['static/description/banner.png'],
'license': 'LGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

22
pos_face_recognition/controllers/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Bhagyadev KP (<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from . import pos_face_recognition

38
pos_face_recognition/controllers/pos_face_recognition.py

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Bhagyadev KP (<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from odoo import http
from odoo.http import request
class CashierImage(http.Controller):
"""
Defining class CashierImage
"""
@http.route('/cashier/image', type='json', auth='public')
def get_cashier_image(self, cashier_id):
"""
Function to get cashier image
:param cashier_id:
:return:
"""
cashier = request.env['hr.employee'].browse(cashier_id)
return cashier.image

7
pos_face_recognition/doc/RELEASE_NOTES.md

@ -0,0 +1,7 @@
## Module <pos_face_recognition>
#### 24.06.2024
#### Version 15.0.1.0.0
#### ADD
- Initial commit for Pos Face Recognition

22
pos_face_recognition/models/__init__.py

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Bhagyadev KP (<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from . import hr_employee

31
pos_face_recognition/models/hr_employee.py

@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
################################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Bhagyadev KP (<https://www.cybrosys.com>)
#
# You can modify it under the terms of the GNU LESSER
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details.
#
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE
# (LGPL v3) along with this program.
# If not, see <http://www.gnu.org/licenses/>.
#
################################################################################
from odoo import fields, models
class HrEmployee(models.Model):
"""
Inheriting hr_employee model to add a image field
"""
_inherit = 'hr.employee'
image = fields.Binary(string="Image", help="Add image for POS face login")

BIN
pos_face_recognition/static/description/assets/icons/check.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
pos_face_recognition/static/description/assets/icons/chevron.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

BIN
pos_face_recognition/static/description/assets/icons/cogs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
pos_face_recognition/static/description/assets/icons/consultation.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
pos_face_recognition/static/description/assets/icons/ecom-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

BIN
pos_face_recognition/static/description/assets/icons/education-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 733 B

BIN
pos_face_recognition/static/description/assets/icons/hotel-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

BIN
pos_face_recognition/static/description/assets/icons/license.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
pos_face_recognition/static/description/assets/icons/lifebuoy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
pos_face_recognition/static/description/assets/icons/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
pos_face_recognition/static/description/assets/icons/manufacturing-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

BIN
pos_face_recognition/static/description/assets/icons/pos-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

BIN
pos_face_recognition/static/description/assets/icons/puzzle.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

BIN
pos_face_recognition/static/description/assets/icons/restaurant-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

BIN
pos_face_recognition/static/description/assets/icons/service-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
pos_face_recognition/static/description/assets/icons/trading-black.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

BIN
pos_face_recognition/static/description/assets/icons/training.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

BIN
pos_face_recognition/static/description/assets/icons/update.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
pos_face_recognition/static/description/assets/icons/user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
pos_face_recognition/static/description/assets/icons/wrench.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
pos_face_recognition/static/description/assets/misc/categories.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
pos_face_recognition/static/description/assets/misc/check-box.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
pos_face_recognition/static/description/assets/misc/compass.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
pos_face_recognition/static/description/assets/misc/corporate.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
pos_face_recognition/static/description/assets/misc/customer-support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
pos_face_recognition/static/description/assets/misc/cybrosys-logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
pos_face_recognition/static/description/assets/misc/features.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

BIN
pos_face_recognition/static/description/assets/misc/logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
pos_face_recognition/static/description/assets/misc/pictures.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
pos_face_recognition/static/description/assets/misc/pie-chart.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
pos_face_recognition/static/description/assets/misc/right-arrow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

BIN
pos_face_recognition/static/description/assets/misc/star.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
pos_face_recognition/static/description/assets/misc/support.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
pos_face_recognition/static/description/assets/misc/whatsapp.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
pos_face_recognition/static/description/assets/modules/l1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
pos_face_recognition/static/description/assets/modules/l2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
pos_face_recognition/static/description/assets/modules/l3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
pos_face_recognition/static/description/assets/modules/l4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
pos_face_recognition/static/description/assets/modules/l5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
pos_face_recognition/static/description/assets/modules/l6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

BIN
pos_face_recognition/static/description/assets/screenshots/1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

BIN
pos_face_recognition/static/description/assets/screenshots/2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

BIN
pos_face_recognition/static/description/assets/screenshots/3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

BIN
pos_face_recognition/static/description/assets/screenshots/4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

BIN
pos_face_recognition/static/description/assets/screenshots/5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

BIN
pos_face_recognition/static/description/assets/screenshots/6.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

BIN
pos_face_recognition/static/description/assets/screenshots/7.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

BIN
pos_face_recognition/static/description/assets/screenshots/8.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

BIN
pos_face_recognition/static/description/assets/screenshots/hero.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

BIN
pos_face_recognition/static/description/banner.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
pos_face_recognition/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

635
pos_face_recognition/static/description/index.html

@ -0,0 +1,635 @@
<div style="background-color: #714B67; height: 810px; width: 100%; padding: 15px; position: relative;">
<!-- TITLE BAR -->
<div class="d-flex align-items-center justify-content-between"
style="border-bottom: 1px solid #875A7B; padding: 15px; display: flex; justify-content: space-between; align-items: center;">
<img src="assets/misc/cybrosys-logo.png" width="42" height="42"
style="width: 42px; height: 42px;"/>
<div>
<div style="color: #7C7BAD; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Community
</div>
<div style="color: #875A7B; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Enterprise
</div>
<div style="color: #017E84; font-size: 14px; font-family: 'Montserrat', sans-serif; font-weight: bold; background-color: white; display: inline-block; padding: 3px 10px; border-radius: 50px;"
class="mr-2">
<i class="fa fa-check mr-1"></i>Odoo sh
</div>
</div>
</div>
<!-- END OF TITLE BAR -->
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12">
<!-- APP HERO -->
<h1 style="color: #FFFFFF; font-weight: bolder; font-size: 50px; text-align: center; margin-top: 50px;">Pos Face Recognition</h1>
<p style="color:#FFFFFF; padding: 8px 15px; text-align: center; font-size: 24px;">POS Session Login by Face Recognition.</p>
<!-- END OF APP HERO -->
<img src="./assets/screenshots/hero.gif" class="img-responsive"
width="100%" height="auto"/>
</div>
</div>
</div>
</div>
<!-- NAVIGATION SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px; margin-top: 300px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/compass.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Explore This
Module</h2>
</div>
<div class="row my-4" style="font-family: 'Montserrat', sans-serif;">
<div class="col-sm-12 col-md-6 my-3">
<a href="#overview">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Overview</span>
<span
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">Learn
more about this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#features">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Features</span>
<span
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
features of this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
<div class="col-sm-12 col-md-6 my-3">
<a href="#screenshots">
<div class="d-flex justify-content-between align-items-center"
style="background-color: #f5f5f5; padding: 30px; width: 100%;">
<div>
<span style="color: #714B67; font-size: 24px; font-weight: 500; display: block;">Screenshots</span>
<span
style="color: #714B67; font-size: 16px; font-weight: 400; color:#282F33; display: block;">View
screenshots for this
module</span>
</div>
<img src="assets/misc/right-arrow.png" width="36" height="36"/>
</div>
</a>
</div>
</div>
<!-- END OF NAVIGATION SECTION -->
<!-- OVERVIEW SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="overview">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pie-chart.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Overview
</h2>
</div>
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 py-4">This module helps you to login pos session by face recognition.
</div>
</div>
<!-- END OF OVERVIEW SECTION -->
<!-- FEATURES SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;" id="features">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/features.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Features
</h2>
</div>
<div class="row"
style="font-family: 'Montserrat', sans-serif; font-weight: 400; font-size: 14px; line-height: 200%;">
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-center"
style="margin-top: 40px; margin-bottom: 40px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Community Support.</span>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="d-flex align-items-center"
style="margin-top: 40px; margin-bottom: 40px">
<img src="assets/misc/check-box.png" class="mr-2"/>
<span style="font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: bold;">Login by using face recognition.</span>
</div>
</div>
</div>
<!-- END OF FEATURES SECTION -->
<!-- SCREENSHOTS SECTION -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;"
id="screenshots">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/pictures.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Screenshots
</h2>
</div>
<div class="row">
<div class="col-sm-12">
<div style="display: block; margin: 30px auto;">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Go to Employee module. Select the employee and add employee image on the field marked in the below image
</p>
<img src="assets/screenshots/1.png" class="img-thumbnail">
</div>
<div class="col-lg-12 my-2">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">Go to POS -> Dashboard -> Settings. Then Add the respective employees
</p>
<img src="assets/screenshots/2.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
<img src="assets/screenshots/3.png"
class="img-responsive img-thumbnail border" width="100%"
height="auto"/>
</div>
<div style="display: block; margin: 30px auto;">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Go to POS dashboard and start a new session.
</p>
<img src="assets/screenshots/4.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
click on select cashier.
</p>
<img src="assets/screenshots/5.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
Select any cashier. Web camera will be opened .
</p>
<img src="assets/screenshots/6.png" class="img-thumbnail">
<img src="assets/screenshots/7.png" class="img-thumbnail">
</div>
<div style="display: block; margin: 30px auto;">
<p style="font-weight: 400; font-family: 'Montserrat', sans-serif; font-size: 14px;">
If face matches you will enter the POS session.
</p>
<img src="assets/screenshots/8.png" class="img-thumbnail">
</div>
</div>
<!-- END OF SCREENSHOTS SECTION -->
<!-- RELATED PRODUCTS -->
<div class="row">
<div class="col-lg-12 d-flex flex-column justify-content-center"
style="text-align: center; padding: 2.5rem 1rem !important;">
<h2 style="color: #212529 !important;">Suggested Products</h2>
<hr style="border: 3px solid #714B67 !important; background-color: #714B67 !important; width: 80px !important; margin-bottom: 2rem !important;"/>
<div id="demo1" class="row carousel slide" data-ride="carousel">
<!-- The slideshow -->
<div class="carousel-inner">
<div class="carousel-item active" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/pos_credit_limit/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/l1.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/pos_report_generator/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/l2.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/dashboard_pos/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/l3.png">
</div>
</a>
</div>
</div>
<div class="carousel-item" style="min-height:0px">
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/login_pos_direct/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/l4.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/pos_book_order/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/l5.png">
</div>
</a>
</div>
<div class="col-xs-12 col-sm-4 col-md-4 mb16 mt16"
style="float:left">
<a href="https://apps.odoo.com/apps/modules/15.0/multi_barcodes_pos/"
target="_blank">
<div style="border-radius:10px">
<img class="img img-responsive center-block"
style="border-top-left-radius:10px; border-top-right-radius:10px"
src="./assets/modules/l6.png">
</div>
</a>
</div>
</div>
</div>
<!-- Left and right controls -->
<a class="carousel-control-prev" href="#demo1" data-slide="prev"
style="left:-25px;width: 35px;color: #000;">
<span class="carousel-control-prev-icon">
<i class="fa fa-chevron-left"
style="font-size:24px"></i>
</span>
</a>
<a class="carousel-control-next" href="#demo1" data-slide="next"
style="right:-25px;width: 35px;color: #000;">
<span class="carousel-control-next-icon">
<i class="fa fa-chevron-right"
style="font-size:24px"></i>
</span>
</a>
</div>
</div>
</div>
<!-- END OF RELATED PRODUCTS -->
<!-- OUR SERVICES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/star.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our Services
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #1dd1a1 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/cogs.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Customization</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ff6b6b !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/wrench.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6462CD !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/lifebuoy.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Support</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #ffa801 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/user.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Hire
Odoo
Developer</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #54a0ff !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/puzzle.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Integration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #6d7680 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/update.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Migration</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #786fa6 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/consultation.png"
class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Consultancy</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #f8a5c2 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/training.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Implementation</h6>
</div>
<div class="col-lg-4 d-flex flex-column justify-content-center align-items-center my-4">
<div class="d-flex justify-content-center align-items-center mx-3 my-3"
style="background-color: #e6be26 !important; border-radius: 15px !important; height: 80px; width: 80px;">
<img src="assets/icons/license.png" class="img-responsive"
height="48px" width="48px">
</div>
<h6 class="text-center"
style="font-family: Montserrat, 'sans-serif' !important; font-weight: bold;">
Odoo
Licensing Consultancy</h6>
</div>
</div>
</div>
<!-- OUR INDUSTRIES -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/corporate.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Our
Industries
</h2>
</div>
<div class="container my-5">
<div class="row">
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/trading-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Trading
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easily procure
and
sell your products</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/pos-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
POS
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Easy
configuration
and convivial experience</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/education-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Education
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
A platform for
educational management</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/manufacturing-black.png"
class="img-responsive mb-3" height="48px"
width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Manufacturing
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Plan, track and
schedule your operations</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/ecom-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
E-commerce &amp; Website
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Mobile
friendly,
awe-inspiring product pages</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/service-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Service Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Keep track of
services and invoice</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/restaurant-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Restaurant
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
Run your bar or
restaurant methodically</p>
</div>
</div>
<div class="col-lg-3">
<div class="my-4 d-flex flex-column justify-content-center"
style="background-color: #f6f8f9 !important; border-radius: 0px; padding: 2rem !important; height: 250px !important;">
<img src="assets/icons/hotel-black.png"
class="img-responsive mb-3" height="48px" width="48px">
<h5 style="font-family: Montserrat, sans-serif !important; color: #000 !important; font-weight: bold;">
Hotel Management
</h5>
<p style="font-family: Montserrat, sans-serif !important; font-size: 0.9rem !important;">
An
all-inclusive
hotel management application</p>
</div>
</div>
</div>
</div>
<!-- SUPPORT -->
<div class="d-flex align-items-center"
style="border-bottom: 2px solid #714B67; padding: 15px 0px;">
<div class="d-flex justify-content-center align-items-center mr-2"
style="background-color: #F5F5F5; border-radius: 0px; width: 40px; height: 40px;">
<img src="assets/misc/customer-support.png"/>
</div>
<h2 class="mt-2"
style="font-family: 'Montserrat', sans-serif; font-size: 24px; font-weight: bold;">
Support
</h2>
</div>
<div class="container mt-5">
<div class="row">
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
style="background-color: #714B67; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/support.png" height="48"
width="48"
style="width: 42px; height: 42px;"/>
</div>
<div>
<h4>Need Help?</h4>
<p style="line-height: 100%;">Got questions or need
help?
Get in touch.</p>
<a href="mailto:odoo@cybrosys.com">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
odoo@cybrosys.com</p>
</a>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div style="background-color: #F6F8F9; padding: 30px; display: flex; align-items: center;">
<div class="mr-4"
style="background-color: #2AC44D; display: inline-block; height: 70px; width: 70px; display: flex; align-items: center; justify-content: center;">
<img src="assets/misc/whatsapp.png" height="52"
width="52"
style="width: 52px; height: 52px;"/>
</div>
<div>
<h4>WhatsApp</h4>
<p style="line-height: 100%;">Say hi to us on
WhatsApp!</p>
<a href="https://api.whatsapp.com/send?phone=918606827707">
<p style="font-weight: 400; font-size: 28px; line-height: 80%; color: #714B67;">
+91 86068
27707</p>
</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 my-5 d-flex justify-content-center align-items-center">
<img src="assets/misc/logo.png" width="144" height="31"
style="width:144px; height: 31px; margin-top: 40px;"/>
</div>
</div>
</div>
<!-- END OF SUPPORT -->
</div>

140
pos_face_recognition/static/src/js/LoginScreen.js

@ -0,0 +1,140 @@
odoo.define('pos_face_recognition.FaceLoginScreen', function (require) {
"use strict";
const LoginScreen = require('pos_hr.LoginScreen');
const {patch} = require('web.utils');
const {_t} = require('web.core');
const {useService} = require("@web/core/utils/hooks");
const {useState} = owl.hooks;
const {useRef} = owl.hooks;
var ajax = require('web.ajax');
const {Gui} = require('point_of_sale.Gui');
const {posbus} = require('point_of_sale.utils');
const MODEL_URL = '/pos_face_recognition/static/src/js/weights';
faceapi.nets.ssdMobilenetv1.loadFromUri(MODEL_URL)
faceapi.nets.faceLandmark68Net.loadFromUri(MODEL_URL)
faceapi.nets.faceRecognitionNet.loadFromUri(MODEL_URL)
faceapi.nets.tinyFaceDetector.load(MODEL_URL),
faceapi.nets.faceLandmark68TinyNet.load(MODEL_URL),
faceapi.nets.faceExpressionNet.load(MODEL_URL),
faceapi.nets.ageGenderNet.load(MODEL_URL)
// patching Login Screen
patch(LoginScreen.prototype, 'pos_hr/static/src/js/LoginScreen.js', {
// setup function
setup() {
// super.setup(...arguments);
this.state = useState({
imageUrl: false
})
this.rpc = useService("rpc");
this.root = useRef("LoginRoot");
this.faceMatcher = null;
},
// overriding back function
async back() {
await this.loadImage()
},
// overriding selectCashier function
async selectCashier() {
const list = this.env.pos.employees.map((employee) => {
return {
id: employee.id,
item: employee,
label: employee.name,
isSelected: false,
};
});
const employee = await this.selectEmployee(list);
if (employee) {
this.env.pos.set_cashier(employee);
this.back();
}
this.root.el.querySelector('#login-screen').style.zIndex = -1
},
// Function to loadimage
async loadImage() {
var cashier_id = this.env.pos.changed.cashier.id
await ajax.jsonRpc('/cashier/image/', 'call', {
cashier_id: cashier_id,
}).then(async data => {
if (data) {
this.have_image = data
const employee_image = this.root.el.querySelector('#employee_image')
employee_image.src = "data:image/jpeg;base64," + data
await this.startWebcam()
} else {
await Gui.showPopup("ErrorPopup", {
'title': _t('Authentication failed'),
'body': _t('Selected cashier have no image..'),
});
location.reload();
}
});
},
// Function to start webcam
startWebcam() {
const video = this.root.el.querySelector('#video')
navigator.mediaDevices.getUserMedia(
{video: true, audio: false}
).then((stream) => {
video.srcObject = stream
}).catch((error) => {
console.error(error)
}).then(this.faceRecognition(video))
},
// Function to get the descriptions of cashier image
async getLabeledFaceDescriptions() {
const employee_image = this.root.el.querySelector('#employee_image');
const detections = await faceapi
.detectSingleFace(employee_image)
.withFaceLandmarks()
.withFaceExpressions()
.withFaceDescriptor();
return detections
},
// Function which compares the webcam image with cashier image
async faceRecognition(video) {
const labeledFaceDescriptors = await this.getLabeledFaceDescriptions()
if (!this.faceMatcher) {
this.faceMatcher = new faceapi.FaceMatcher([labeledFaceDescriptors.descriptor]);
}
video.addEventListener('play', () => {
const canvas = faceapi.createCanvasFromMedia(video);
document.body.append(canvas);
const displaySize = {width: video.width, height: video.height}
faceapi.matchDimensions(canvas, displaySize)
setInterval(async () => {
const detections = await faceapi
.detectAllFaces(video)
.withFaceLandmarks()
.withFaceExpressions()
.withFaceDescriptors();
detections.forEach((detection) => {
const match = this.faceMatcher.findBestMatch(detection.descriptor);
if (match._distance < 0.4) { // Adjust threshold as needed
const modal = document.getElementById('WebCamModal');
if (modal) {
modal.style.display = 'none';
this.props.resolve({
confirmed: false,
payload: false
});
this.trigger('close-temp-screen');
this.env.pos.hasLoggedIn = true;
posbus.trigger('start-cash-control');
video.srcObject.getTracks().forEach(track => track.stop());
canvas.remove();
}
} else {
}
});
}, 100);
})
},
});
});

1
pos_face_recognition/static/src/js/face-api.min.js

File diff suppressed because one or more lines are too long

BIN
pos_face_recognition/static/src/js/weights/age_gender_model-shard1

Binary file not shown.

618
pos_face_recognition/static/src/js/weights/age_gender_model-weights_manifest.json

@ -0,0 +1,618 @@
[
{
"weights": [
{
"name": "entry_flow/conv_in/filters",
"shape": [
3,
3,
3,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005431825039433498,
"min": -0.7441600304023892
}
},
{
"name": "entry_flow/conv_in/bias",
"shape": [
32
],
"dtype": "float32"
},
{
"name": "entry_flow/reduction_block_0/separable_conv0/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005691980614381678,
"min": -0.6090419257388395
}
},
{
"name": "entry_flow/reduction_block_0/separable_conv0/pointwise_filter",
"shape": [
1,
1,
32,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.009089225881239947,
"min": -1.1179747833925135
}
},
{
"name": "entry_flow/reduction_block_0/separable_conv0/bias",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "entry_flow/reduction_block_0/separable_conv1/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.00683894624897078,
"min": -0.8138346036275228
}
},
{
"name": "entry_flow/reduction_block_0/separable_conv1/pointwise_filter",
"shape": [
1,
1,
64,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.011632566358528886,
"min": -1.3028474321552352
}
},
{
"name": "entry_flow/reduction_block_0/separable_conv1/bias",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "entry_flow/reduction_block_0/expansion_conv/filters",
"shape": [
1,
1,
32,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010254812240600587,
"min": -0.9229331016540528
}
},
{
"name": "entry_flow/reduction_block_0/expansion_conv/bias",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "entry_flow/reduction_block_1/separable_conv0/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0052509616403018725,
"min": -0.6406173201168285
}
},
{
"name": "entry_flow/reduction_block_1/separable_conv0/pointwise_filter",
"shape": [
1,
1,
64,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010788509424994973,
"min": -1.4564487723743214
}
},
{
"name": "entry_flow/reduction_block_1/separable_conv0/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "entry_flow/reduction_block_1/separable_conv1/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.00553213918910307,
"min": -0.7025816770160899
}
},
{
"name": "entry_flow/reduction_block_1/separable_conv1/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.013602388606351965,
"min": -1.6186842441558837
}
},
{
"name": "entry_flow/reduction_block_1/separable_conv1/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "entry_flow/reduction_block_1/expansion_conv/filters",
"shape": [
1,
1,
64,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.007571851038465313,
"min": -1.158493208885193
}
},
{
"name": "entry_flow/reduction_block_1/expansion_conv/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "middle_flow/main_block_0/separable_conv0/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005766328409606335,
"min": -0.6688940955143349
}
},
{
"name": "middle_flow/main_block_0/separable_conv0/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.012136116214826995,
"min": -1.5776951079275094
}
},
{
"name": "middle_flow/main_block_0/separable_conv0/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "middle_flow/main_block_0/separable_conv1/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004314773222979377,
"min": -0.5652352922102984
}
},
{
"name": "middle_flow/main_block_0/separable_conv1/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.01107162026798024,
"min": -1.2400214700137868
}
},
{
"name": "middle_flow/main_block_0/separable_conv1/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "middle_flow/main_block_0/separable_conv2/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0036451735917259667,
"min": -0.4848080876995536
}
},
{
"name": "middle_flow/main_block_0/separable_conv2/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.008791744942758598,
"min": -1.134135097615859
}
},
{
"name": "middle_flow/main_block_0/separable_conv2/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "middle_flow/main_block_1/separable_conv0/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004915751896652521,
"min": -0.6095532351849126
}
},
{
"name": "middle_flow/main_block_1/separable_conv0/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010868691463096469,
"min": -1.3368490499608656
}
},
{
"name": "middle_flow/main_block_1/separable_conv0/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "middle_flow/main_block_1/separable_conv1/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005010117269029804,
"min": -0.6012140722835765
}
},
{
"name": "middle_flow/main_block_1/separable_conv1/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010311148213405235,
"min": -1.3816938605963016
}
},
{
"name": "middle_flow/main_block_1/separable_conv1/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "middle_flow/main_block_1/separable_conv2/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004911523706772748,
"min": -0.7367285560159123
}
},
{
"name": "middle_flow/main_block_1/separable_conv2/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.008976466047997568,
"min": -1.2207993825276693
}
},
{
"name": "middle_flow/main_block_1/separable_conv2/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "exit_flow/reduction_block/separable_conv0/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005074804436926748,
"min": -0.7104726211697447
}
},
{
"name": "exit_flow/reduction_block/separable_conv0/pointwise_filter",
"shape": [
1,
1,
128,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.011453078307357489,
"min": -1.4545409450344011
}
},
{
"name": "exit_flow/reduction_block/separable_conv0/bias",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "exit_flow/reduction_block/separable_conv1/depthwise_filter",
"shape": [
3,
3,
256,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.007741751390344957,
"min": -1.1380374543807086
}
},
{
"name": "exit_flow/reduction_block/separable_conv1/pointwise_filter",
"shape": [
1,
1,
256,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.011347713189966538,
"min": -1.497898141075583
}
},
{
"name": "exit_flow/reduction_block/separable_conv1/bias",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "exit_flow/reduction_block/expansion_conv/filters",
"shape": [
1,
1,
128,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006717281014311547,
"min": -0.8329428457746318
}
},
{
"name": "exit_flow/reduction_block/expansion_conv/bias",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "exit_flow/separable_conv/depthwise_filter",
"shape": [
3,
3,
256,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0027201742518181892,
"min": -0.3237007359663645
}
},
{
"name": "exit_flow/separable_conv/pointwise_filter",
"shape": [
1,
1,
256,
512
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010076364348916447,
"min": -1.330080094056971
}
},
{
"name": "exit_flow/separable_conv/bias",
"shape": [
512
],
"dtype": "float32"
},
{
"name": "fc/age/weights",
"shape": [
512,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.008674054987290326,
"min": -1.2664120281443876
}
},
{
"name": "fc/age/bias",
"shape": [
1
],
"dtype": "float32"
},
{
"name": "fc/gender/weights",
"shape": [
512,
2
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0029948226377075793,
"min": -0.34140978069866407
}
},
{
"name": "fc/gender/bias",
"shape": [
2
],
"dtype": "float32"
}
],
"paths": [
"age_gender_model-shard1"
]
}
]

BIN
pos_face_recognition/static/src/js/weights/face_expression_model-shard1

Binary file not shown.

606
pos_face_recognition/static/src/js/weights/face_expression_model-weights_manifest.json

@ -0,0 +1,606 @@
[
{
"weights": [
{
"name": "dense0/conv0/filters",
"shape": [
3,
3,
3,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0057930146946626555,
"min": -0.7125408074435067
}
},
{
"name": "dense0/conv0/bias",
"shape": [
32
],
"dtype": "float32"
},
{
"name": "dense0/conv1/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006473719839956246,
"min": -0.6408982641556684
}
},
{
"name": "dense0/conv1/pointwise_filter",
"shape": [
1,
1,
32,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010509579321917366,
"min": -1.408283629136927
}
},
{
"name": "dense0/conv1/bias",
"shape": [
32
],
"dtype": "float32"
},
{
"name": "dense0/conv2/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005666389652326995,
"min": -0.7252978754978554
}
},
{
"name": "dense0/conv2/pointwise_filter",
"shape": [
1,
1,
32,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010316079270605948,
"min": -1.1760330368490781
}
},
{
"name": "dense0/conv2/bias",
"shape": [
32
],
"dtype": "float32"
},
{
"name": "dense0/conv3/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0063220320963392074,
"min": -0.853474333005793
}
},
{
"name": "dense0/conv3/pointwise_filter",
"shape": [
1,
1,
32,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010322785377502442,
"min": -1.4658355236053466
}
},
{
"name": "dense0/conv3/bias",
"shape": [
32
],
"dtype": "float32"
},
{
"name": "dense1/conv0/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0042531527724920535,
"min": -0.5741756242864272
}
},
{
"name": "dense1/conv0/pointwise_filter",
"shape": [
1,
1,
32,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010653339647779278,
"min": -1.1825207009035
}
},
{
"name": "dense1/conv0/bias",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "dense1/conv1/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005166931012097527,
"min": -0.6355325144879957
}
},
{
"name": "dense1/conv1/pointwise_filter",
"shape": [
1,
1,
64,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.011478300188101974,
"min": -1.3888743227603388
}
},
{
"name": "dense1/conv1/bias",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "dense1/conv2/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006144821410085641,
"min": -0.8479853545918185
}
},
{
"name": "dense1/conv2/pointwise_filter",
"shape": [
1,
1,
64,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010541967317169788,
"min": -1.3809977185492421
}
},
{
"name": "dense1/conv2/bias",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "dense1/conv3/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005769844849904378,
"min": -0.686611537138621
}
},
{
"name": "dense1/conv3/pointwise_filter",
"shape": [
1,
1,
64,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010939095534530341,
"min": -1.2689350820055196
}
},
{
"name": "dense1/conv3/bias",
"shape": [
64
],
"dtype": "float32"
},
{
"name": "dense2/conv0/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0037769308277204924,
"min": -0.40790852939381317
}
},
{
"name": "dense2/conv0/pointwise_filter",
"shape": [
1,
1,
64,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.01188667194516051,
"min": -1.4382873053644218
}
},
{
"name": "dense2/conv0/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "dense2/conv1/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006497045825509464,
"min": -0.8381189114907208
}
},
{
"name": "dense2/conv1/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.011632198913424622,
"min": -1.3377028750438316
}
},
{
"name": "dense2/conv1/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "dense2/conv2/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005947182225246056,
"min": -0.7969224181829715
}
},
{
"name": "dense2/conv2/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.011436844339557722,
"min": -1.4524792311238306
}
},
{
"name": "dense2/conv2/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "dense2/conv3/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006665432686899222,
"min": -0.8998334127313949
}
},
{
"name": "dense2/conv3/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.01283421422920975,
"min": -1.642779421338848
}
},
{
"name": "dense2/conv3/bias",
"shape": [
128
],
"dtype": "float32"
},
{
"name": "dense3/conv0/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004711699953266218,
"min": -0.6737730933170692
}
},
{
"name": "dense3/conv0/pointwise_filter",
"shape": [
1,
1,
128,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010955964817720302,
"min": -1.3914075318504784
}
},
{
"name": "dense3/conv0/bias",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "dense3/conv1/depthwise_filter",
"shape": [
3,
3,
256,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.00554193468654857,
"min": -0.7149095745647656
}
},
{
"name": "dense3/conv1/pointwise_filter",
"shape": [
1,
1,
256,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.016790372250126858,
"min": -2.484975093018775
}
},
{
"name": "dense3/conv1/bias",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "dense3/conv2/depthwise_filter",
"shape": [
3,
3,
256,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006361540626077091,
"min": -0.8142772001378676
}
},
{
"name": "dense3/conv2/pointwise_filter",
"shape": [
1,
1,
256,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.01777329678628959,
"min": -1.7062364914838006
}
},
{
"name": "dense3/conv2/bias",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "dense3/conv3/depthwise_filter",
"shape": [
3,
3,
256,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006900275922289082,
"min": -0.8625344902861353
}
},
{
"name": "dense3/conv3/pointwise_filter",
"shape": [
1,
1,
256,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.015449936717164282,
"min": -1.9003422162112067
}
},
{
"name": "dense3/conv3/bias",
"shape": [
256
],
"dtype": "float32"
},
{
"name": "fc/weights",
"shape": [
256,
7
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004834276554631252,
"min": -0.7203072066400565
}
},
{
"name": "fc/bias",
"shape": [
7
],
"dtype": "float32"
}
],
"paths": [
"face_expression_model-shard1"
]
}
]

BIN
pos_face_recognition/static/src/js/weights/face_landmark_68_model-shard1

Binary file not shown.

691
pos_face_recognition/static/src/js/weights/face_landmark_68_model-weights_manifest.json

@ -0,0 +1,691 @@
[
{
"weights": [
{
"name": "dense0/conv0/filters",
"shape": [
3,
3,
3,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004853619781194949,
"min": -0.5872879935245888
}
},
{
"name": "dense0/conv0/bias",
"shape": [
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004396426443960153,
"min": -0.7298067896973853
}
},
{
"name": "dense0/conv1/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.00635151559231328,
"min": -0.5589333721235686
}
},
{
"name": "dense0/conv1/pointwise_filter",
"shape": [
1,
1,
32,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.009354315552057004,
"min": -1.2628325995276957
}
},
{
"name": "dense0/conv1/bias",
"shape": [
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0029380727048013726,
"min": -0.5846764682554731
}
},
{
"name": "dense0/conv2/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0049374802439820535,
"min": -0.6171850304977566
}
},
{
"name": "dense0/conv2/pointwise_filter",
"shape": [
1,
1,
32,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.009941946758943446,
"min": -1.3421628124573652
}
},
{
"name": "dense0/conv2/bias",
"shape": [
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0030300481062309416,
"min": -0.5272283704841838
}
},
{
"name": "dense0/conv3/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005672684837790097,
"min": -0.7431217137505026
}
},
{
"name": "dense0/conv3/pointwise_filter",
"shape": [
1,
1,
32,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010712201455060173,
"min": -1.5639814124387852
}
},
{
"name": "dense0/conv3/bias",
"shape": [
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0030966934035806097,
"min": -0.3839899820439956
}
},
{
"name": "dense1/conv0/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0039155554537679636,
"min": -0.48161332081345953
}
},
{
"name": "dense1/conv0/pointwise_filter",
"shape": [
1,
1,
32,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.01023082966898002,
"min": -1.094698774580862
}
},
{
"name": "dense1/conv0/bias",
"shape": [
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0027264176630506327,
"min": -0.3871513081531898
}
},
{
"name": "dense1/conv1/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004583378632863362,
"min": -0.5454220573107401
}
},
{
"name": "dense1/conv1/pointwise_filter",
"shape": [
1,
1,
64,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.00915846403907327,
"min": -1.117332612766939
}
},
{
"name": "dense1/conv1/bias",
"shape": [
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.003091680419211294,
"min": -0.5966943209077797
}
},
{
"name": "dense1/conv2/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005407439727409214,
"min": -0.708374604290607
}
},
{
"name": "dense1/conv2/pointwise_filter",
"shape": [
1,
1,
64,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.00946493943532308,
"min": -1.2399070660273235
}
},
{
"name": "dense1/conv2/bias",
"shape": [
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004409168514550901,
"min": -0.9788354102303
}
},
{
"name": "dense1/conv3/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004478132958505668,
"min": -0.6493292789833219
}
},
{
"name": "dense1/conv3/pointwise_filter",
"shape": [
1,
1,
64,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.011063695888893277,
"min": -1.2501976354449402
}
},
{
"name": "dense1/conv3/bias",
"shape": [
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.003909627596537272,
"min": -0.6646366914113363
}
},
{
"name": "dense2/conv0/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.003213915404151468,
"min": -0.3374611174359041
}
},
{
"name": "dense2/conv0/pointwise_filter",
"shape": [
1,
1,
64,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010917326048308728,
"min": -1.4520043644250609
}
},
{
"name": "dense2/conv0/bias",
"shape": [
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.002800439152063108,
"min": -0.38085972468058266
}
},
{
"name": "dense2/conv1/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0050568851770139206,
"min": -0.6927932692509071
}
},
{
"name": "dense2/conv1/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.01074961213504567,
"min": -1.3222022926106174
}
},
{
"name": "dense2/conv1/bias",
"shape": [
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0030654204242369708,
"min": -0.5487102559384177
}
},
{
"name": "dense2/conv2/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.00591809165244009,
"min": -0.917304206128214
}
},
{
"name": "dense2/conv2/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.01092823346455892,
"min": -1.366029183069865
}
},
{
"name": "dense2/conv2/bias",
"shape": [
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.002681120470458386,
"min": -0.36463238398234055
}
},
{
"name": "dense2/conv3/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0048311497650894465,
"min": -0.5797379718107336
}
},
{
"name": "dense2/conv3/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.011227761062921263,
"min": -1.4483811771168429
}
},
{
"name": "dense2/conv3/bias",
"shape": [
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0034643323982463162,
"min": -0.3360402426298927
}
},
{
"name": "dense3/conv0/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.003394978887894574,
"min": -0.49227193874471326
}
},
{
"name": "dense3/conv0/pointwise_filter",
"shape": [
1,
1,
128,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010051267287310432,
"min": -1.2765109454884247
}
},
{
"name": "dense3/conv0/bias",
"shape": [
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.003142924752889895,
"min": -0.4588670139219247
}
},
{
"name": "dense3/conv1/depthwise_filter",
"shape": [
3,
3,
256,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.00448304671867221,
"min": -0.5872791201460595
}
},
{
"name": "dense3/conv1/pointwise_filter",
"shape": [
1,
1,
256,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.016063522357566685,
"min": -2.3613377865623026
}
},
{
"name": "dense3/conv1/bias",
"shape": [
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.00287135781026354,
"min": -0.47664539650374765
}
},
{
"name": "dense3/conv2/depthwise_filter",
"shape": [
3,
3,
256,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006002906724518421,
"min": -0.7923836876364315
}
},
{
"name": "dense3/conv2/pointwise_filter",
"shape": [
1,
1,
256,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.017087187019048954,
"min": -1.6061955797906016
}
},
{
"name": "dense3/conv2/bias",
"shape": [
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.003124481205846749,
"min": -0.46242321846531886
}
},
{
"name": "dense3/conv3/depthwise_filter",
"shape": [
3,
3,
256,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006576311588287353,
"min": -1.0193282961845398
}
},
{
"name": "dense3/conv3/pointwise_filter",
"shape": [
1,
1,
256,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.015590153955945782,
"min": -1.99553970636106
}
},
{
"name": "dense3/conv3/bias",
"shape": [
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004453541601405424,
"min": -0.6546706154065973
}
},
{
"name": "fc/weights",
"shape": [
256,
136
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.010417488509533453,
"min": -1.500118345372817
}
},
{
"name": "fc/bias",
"shape": [
136
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0025084222648658005,
"min": 0.07683877646923065
}
}
],
"paths": [
"face_landmark_68_model-shard1"
]
}
]

BIN
pos_face_recognition/static/src/js/weights/face_landmark_68_tiny_model-shard1

Binary file not shown.

397
pos_face_recognition/static/src/js/weights/face_landmark_68_tiny_model-weights_manifest.json

@ -0,0 +1,397 @@
[
{
"weights": [
{
"name": "dense0/conv0/filters",
"shape": [
3,
3,
3,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.008194216092427571,
"min": -0.9423348506291708
}
},
{
"name": "dense0/conv0/bias",
"shape": [
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006839508168837603,
"min": -0.8412595047670252
}
},
{
"name": "dense0/conv1/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.009194007106855804,
"min": -1.2779669878529567
}
},
{
"name": "dense0/conv1/pointwise_filter",
"shape": [
1,
1,
32,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0036026100317637128,
"min": -0.3170296827952067
}
},
{
"name": "dense0/conv1/bias",
"shape": [
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.000740380117706224,
"min": -0.06367269012273527
}
},
{
"name": "dense0/conv2/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 1,
"min": 0
}
},
{
"name": "dense0/conv2/pointwise_filter",
"shape": [
1,
1,
32,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 1,
"min": 0
}
},
{
"name": "dense0/conv2/bias",
"shape": [
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0037702228508743585,
"min": -0.6220867703942692
}
},
{
"name": "dense1/conv0/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0033707996209462483,
"min": -0.421349952618281
}
},
{
"name": "dense1/conv0/pointwise_filter",
"shape": [
1,
1,
32,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.014611541991140328,
"min": -1.8556658328748217
}
},
{
"name": "dense1/conv0/bias",
"shape": [
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.002832523046755323,
"min": -0.30307996600281956
}
},
{
"name": "dense1/conv1/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006593170586754294,
"min": -0.6329443763284123
}
},
{
"name": "dense1/conv1/pointwise_filter",
"shape": [
1,
1,
64,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.012215249211180444,
"min": -1.6001976466646382
}
},
{
"name": "dense1/conv1/bias",
"shape": [
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.002384825547536214,
"min": -0.3028728445370992
}
},
{
"name": "dense1/conv2/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005859645441466687,
"min": -0.7617539073906693
}
},
{
"name": "dense1/conv2/pointwise_filter",
"shape": [
1,
1,
64,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.013121426806730382,
"min": -1.7845140457153321
}
},
{
"name": "dense1/conv2/bias",
"shape": [
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0032247188044529336,
"min": -0.46435950784122243
}
},
{
"name": "dense2/conv0/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.002659512618008782,
"min": -0.32977956463308894
}
},
{
"name": "dense2/conv0/pointwise_filter",
"shape": [
1,
1,
64,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.015499923743453681,
"min": -1.9839902391620712
}
},
{
"name": "dense2/conv0/bias",
"shape": [
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0032450980999890497,
"min": -0.522460794098237
}
},
{
"name": "dense2/conv1/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005911862382701799,
"min": -0.792189559282041
}
},
{
"name": "dense2/conv1/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.021025861478319356,
"min": -2.2077154552235325
}
},
{
"name": "dense2/conv1/bias",
"shape": [
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.00349616945958605,
"min": -0.46149436866535865
}
},
{
"name": "dense2/conv2/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.008104994250278847,
"min": -1.013124281284856
}
},
{
"name": "dense2/conv2/pointwise_filter",
"shape": [
1,
1,
128,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.029337059282789044,
"min": -3.5791212325002633
}
},
{
"name": "dense2/conv2/bias",
"shape": [
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0038808938334969913,
"min": -0.4230174278511721
}
},
{
"name": "fc/weights",
"shape": [
128,
136
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.014016061670639936,
"min": -1.8921683255363912
}
},
{
"name": "fc/bias",
"shape": [
136
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0029505149698724935,
"min": 0.088760145008564
}
}
],
"paths": [
"face_landmark_68_tiny_model-shard1"
]
}
]

BIN
pos_face_recognition/static/src/js/weights/face_recognition_model-shard1

Binary file not shown.

6
pos_face_recognition/static/src/js/weights/face_recognition_model-shard2

File diff suppressed because one or more lines are too long

1462
pos_face_recognition/static/src/js/weights/face_recognition_model-weights_manifest.json

File diff suppressed because it is too large

BIN
pos_face_recognition/static/src/js/weights/mtcnn_model-shard1

Binary file not shown.

402
pos_face_recognition/static/src/js/weights/mtcnn_model-weights_manifest.json

@ -0,0 +1,402 @@
[
{
"paths": [
"mtcnn_model-shard1"
],
"weights": [
{
"dtype": "float32",
"name": "pnet/conv1/weights",
"shape": [
3,
3,
3,
10
]
},
{
"dtype": "float32",
"name": "pnet/conv1/bias",
"shape": [
10
]
},
{
"dtype": "float32",
"name": "pnet/prelu1_alpha",
"shape": [
10
]
},
{
"dtype": "float32",
"name": "pnet/conv2/weights",
"shape": [
3,
3,
10,
16
]
},
{
"dtype": "float32",
"name": "pnet/conv2/bias",
"shape": [
16
]
},
{
"dtype": "float32",
"name": "pnet/prelu2_alpha",
"shape": [
16
]
},
{
"dtype": "float32",
"name": "pnet/conv3/weights",
"shape": [
3,
3,
16,
32
]
},
{
"dtype": "float32",
"name": "pnet/conv3/bias",
"shape": [
32
]
},
{
"dtype": "float32",
"name": "pnet/prelu3_alpha",
"shape": [
32
]
},
{
"dtype": "float32",
"name": "pnet/conv4_1/weights",
"shape": [
1,
1,
32,
2
]
},
{
"dtype": "float32",
"name": "pnet/conv4_1/bias",
"shape": [
2
]
},
{
"dtype": "float32",
"name": "pnet/conv4_2/weights",
"shape": [
1,
1,
32,
4
]
},
{
"dtype": "float32",
"name": "pnet/conv4_2/bias",
"shape": [
4
]
},
{
"dtype": "float32",
"name": "rnet/conv1/weights",
"shape": [
3,
3,
3,
28
]
},
{
"dtype": "float32",
"name": "rnet/conv1/bias",
"shape": [
28
]
},
{
"dtype": "float32",
"name": "rnet/prelu1_alpha",
"shape": [
28
]
},
{
"dtype": "float32",
"name": "rnet/conv2/weights",
"shape": [
3,
3,
28,
48
]
},
{
"dtype": "float32",
"name": "rnet/conv2/bias",
"shape": [
48
]
},
{
"dtype": "float32",
"name": "rnet/prelu2_alpha",
"shape": [
48
]
},
{
"dtype": "float32",
"name": "rnet/conv3/weights",
"shape": [
2,
2,
48,
64
]
},
{
"dtype": "float32",
"name": "rnet/conv3/bias",
"shape": [
64
]
},
{
"dtype": "float32",
"name": "rnet/prelu3_alpha",
"shape": [
64
]
},
{
"dtype": "float32",
"name": "rnet/fc1/weights",
"shape": [
576,
128
]
},
{
"dtype": "float32",
"name": "rnet/fc1/bias",
"shape": [
128
]
},
{
"dtype": "float32",
"name": "rnet/prelu4_alpha",
"shape": [
128
]
},
{
"dtype": "float32",
"name": "rnet/fc2_1/weights",
"shape": [
128,
2
]
},
{
"dtype": "float32",
"name": "rnet/fc2_1/bias",
"shape": [
2
]
},
{
"dtype": "float32",
"name": "rnet/fc2_2/weights",
"shape": [
128,
4
]
},
{
"dtype": "float32",
"name": "rnet/fc2_2/bias",
"shape": [
4
]
},
{
"dtype": "float32",
"name": "onet/conv1/weights",
"shape": [
3,
3,
3,
32
]
},
{
"dtype": "float32",
"name": "onet/conv1/bias",
"shape": [
32
]
},
{
"dtype": "float32",
"name": "onet/prelu1_alpha",
"shape": [
32
]
},
{
"dtype": "float32",
"name": "onet/conv2/weights",
"shape": [
3,
3,
32,
64
]
},
{
"dtype": "float32",
"name": "onet/conv2/bias",
"shape": [
64
]
},
{
"dtype": "float32",
"name": "onet/prelu2_alpha",
"shape": [
64
]
},
{
"dtype": "float32",
"name": "onet/conv3/weights",
"shape": [
3,
3,
64,
64
]
},
{
"dtype": "float32",
"name": "onet/conv3/bias",
"shape": [
64
]
},
{
"dtype": "float32",
"name": "onet/prelu3_alpha",
"shape": [
64
]
},
{
"dtype": "float32",
"name": "onet/conv4/weights",
"shape": [
2,
2,
64,
128
]
},
{
"dtype": "float32",
"name": "onet/conv4/bias",
"shape": [
128
]
},
{
"dtype": "float32",
"name": "onet/prelu4_alpha",
"shape": [
128
]
},
{
"dtype": "float32",
"name": "onet/fc1/weights",
"shape": [
1152,
256
]
},
{
"dtype": "float32",
"name": "onet/fc1/bias",
"shape": [
256
]
},
{
"dtype": "float32",
"name": "onet/prelu5_alpha",
"shape": [
256
]
},
{
"dtype": "float32",
"name": "onet/fc2_1/weights",
"shape": [
256,
2
]
},
{
"dtype": "float32",
"name": "onet/fc2_1/bias",
"shape": [
2
]
},
{
"dtype": "float32",
"name": "onet/fc2_2/weights",
"shape": [
256,
4
]
},
{
"dtype": "float32",
"name": "onet/fc2_2/bias",
"shape": [
4
]
},
{
"dtype": "float32",
"name": "onet/fc2_3/weights",
"shape": [
256,
10
]
},
{
"dtype": "float32",
"name": "onet/fc2_3/bias",
"shape": [
10
]
}
]
}
]

BIN
pos_face_recognition/static/src/js/weights/ssd_mobilenetv1_model-shard1

Binary file not shown.

137
pos_face_recognition/static/src/js/weights/ssd_mobilenetv1_model-shard2

File diff suppressed because one or more lines are too long

1936
pos_face_recognition/static/src/js/weights/ssd_mobilenetv1_model-weights_manifest.json

File diff suppressed because it is too large

BIN
pos_face_recognition/static/src/js/weights/tiny_face_detector_model-shard1

Binary file not shown.

273
pos_face_recognition/static/src/js/weights/tiny_face_detector_model-weights_manifest.json

@ -0,0 +1,273 @@
[
{
"weights": [
{
"name": "conv0/filters",
"shape": [
3,
3,
3,
16
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.009007044399485869,
"min": -1.2069439495311063
}
},
{
"name": "conv0/bias",
"shape": [
16
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.005263455241334205,
"min": -0.9211046672334858
}
},
{
"name": "conv1/depthwise_filter",
"shape": [
3,
3,
16,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.004001977630690033,
"min": -0.5042491814669441
}
},
{
"name": "conv1/pointwise_filter",
"shape": [
1,
1,
16,
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.013836609615999109,
"min": -1.411334180831909
}
},
{
"name": "conv1/bias",
"shape": [
32
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0015159862590771096,
"min": -0.30926119685173037
}
},
{
"name": "conv2/depthwise_filter",
"shape": [
3,
3,
32,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.002666276225856706,
"min": -0.317286870876948
}
},
{
"name": "conv2/pointwise_filter",
"shape": [
1,
1,
32,
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.015265831292844286,
"min": -1.6792414422128714
}
},
{
"name": "conv2/bias",
"shape": [
64
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0020280554598453,
"min": -0.37113414915168985
}
},
{
"name": "conv3/depthwise_filter",
"shape": [
3,
3,
64,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006100742489683862,
"min": -0.8907084034938438
}
},
{
"name": "conv3/pointwise_filter",
"shape": [
1,
1,
64,
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.016276211832083907,
"min": -2.0508026908425725
}
},
{
"name": "conv3/bias",
"shape": [
128
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.003394414279975143,
"min": -0.7637432129944072
}
},
{
"name": "conv4/depthwise_filter",
"shape": [
3,
3,
128,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.006716050119961009,
"min": -0.8059260143953211
}
},
{
"name": "conv4/pointwise_filter",
"shape": [
1,
1,
128,
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.021875603993733724,
"min": -2.8875797271728514
}
},
{
"name": "conv4/bias",
"shape": [
256
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.0041141652009066415,
"min": -0.8187188749804216
}
},
{
"name": "conv5/depthwise_filter",
"shape": [
3,
3,
256,
1
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.008423839597141042,
"min": -0.9013508368940915
}
},
{
"name": "conv5/pointwise_filter",
"shape": [
1,
1,
256,
512
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.030007277283014035,
"min": -3.8709387695088107
}
},
{
"name": "conv5/bias",
"shape": [
512
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.008402082966823203,
"min": -1.4871686851277068
}
},
{
"name": "conv8/filters",
"shape": [
1,
1,
512,
25
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.028336129469030042,
"min": -4.675461362389957
}
},
{
"name": "conv8/bias",
"shape": [
25
],
"dtype": "float32",
"quantization": {
"dtype": "uint8",
"scale": 0.002268134028303857,
"min": -0.41053225912299807
}
}
],
"paths": [
"tiny_face_detector_model-shard1"
]
}
]

36
pos_face_recognition/static/src/xml/LoginScreen.xml

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<!-- Replacing LoginScreen to add a modal-->
<t t-inherit="pos_hr.LoginScreen" t-inherit-mode="extension">
<xpath expr="//div[hasclass('login-overlay')]" position="replace">
<div class="login-overlay fixed-top w-100 h-100 bg-view" t-ref="LoginRoot">
<div id="WebCamModal"
style="display: none; margin-top: 250px; margin-left: 780px; left: 0; top: 260px; width: 500px; background-color: transparent">
<div class="container" style="z-index: 1">
<video id="video" width="400" height="400" autoplay=""
muted=""/>
<img id="employee_image"
style="visibility: hidden; height: 10px; width: 10px"/>
</div>
</div>
<div id="login-screen" class="screen-login position-absolute top-0 start-0 bottom-0 end-0 d-flex flex-column py-4 m-auto w-100 rounded bg-view text-center fw-bolder">
<div class="login-title fs-2 mb-3 mb-lg-0">Log in to
<span class="text-primary" t-esc="shopName"/>
</div>
<div class="login-body d-flex d-flex flex-column flex-sm-row align-items-center justify-content-around px-3 py-4">
<span class="login-element border rounded">
<img class="login-barcode-img img-fluid"
src="/point_of_sale/static/img/barcode.png"/>
<div class="login-barcode-text mt-2">Scan your badge</div>
</span>
<span class="login-or m-2 fs-2 text-muted">or</span>
<span class="login-element">
<button class="login-button select-cashier btn btn-lg btn-secondary"
t-on-click="() => this.selectCashier(this.root.el.querySelector('#WebCamModal').style.display = 'block');">Select Cashier</button>
</span>
</div>
</div>
</div>
</xpath>
</t>
</templates>

14
pos_face_recognition/views/hr_employee_view.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- inherit hr.employee view-->
<record id="view_employee_form" model="ir.ui.view">
<field name="name">hr.employee.view.form.inherit.pos.face.recognition</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='pin']" position="after">
<field name="image"/>
</xpath>
</field>
</record>
</odoo>
Loading…
Cancel
Save