Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
307777e
added deepfake models
lous-e Apr 25, 2025
f6fbd53
updated authors
lous-e Apr 25, 2025
7eb5405
added until step 13
lous-e Apr 25, 2025
9a4a3d3
fixed file read
zerOsand Apr 27, 2025
d0483d3
fix try #2
zerOsand Apr 27, 2025
32ba15b
Create First Draft for server.py tests
massbchou Apr 27, 2025
1dab096
update to server
zerOsand Apr 28, 2025
c491108
server.py parser fix
massbchou Apr 28, 2025
ed78d4b
Big Updates
zerOsand Apr 29, 2025
6a8b292
Fix bugs and add logs
prasannals Apr 29, 2025
1ea9bb7
Fix tests
prasannals Apr 29, 2025
d5c03c6
New poetry lock
prasannals Apr 29, 2025
66402b1
Ignoring onnx_models dir
prasannals Apr 29, 2025
2f69110
Linting fixes
prasannals Apr 29, 2025
4ce16f6
Formatting
prasannals Apr 29, 2025
749bc81
Creating dummy files
prasannals Apr 29, 2025
14b45e1
Downloading models
prasannals Apr 29, 2025
4bd3ed1
Merge pull request #1 from lous-e/test_fix
zerOsand Apr 29, 2025
1b4e331
Added resnet50
zerOsand Apr 30, 2025
84cc16d
update to main with resnet50
zerOsand Apr 30, 2025
7112963
fix
zerOsand Apr 30, 2025
597f7cf
fix part 2
zerOsand Apr 30, 2025
82838cf
import fixes; missing normalize func
sahilx13 Apr 30, 2025
92760c7
Added licenses
prasannals May 9, 2025
155cb36
added licenses
lous-e May 11, 2025
42baa4e
added licenses
massbchou May 12, 2025
d710bee
added licenses
zerOsand May 12, 2025
a3863a5
add packaging licenses
zerOsand May 12, 2025
e1404e1
Create LICENSE_repoze.sendmail
zerOsand May 13, 2025
73a41a3
Added Facecropping functionality prototype
massbchou May 14, 2025
f7058a0
add drop down (bug? see desc)
zerOsand May 14, 2025
6552016
actions: black and ruff
lous-e May 14, 2025
4edce3c
Merge branch 'test' into facecropping-and-last-changes
lous-e May 14, 2025
ecb877f
added link to resnet50
lous-e May 14, 2025
9f14f3a
facecropping + UI changes
lous-e May 14, 2025
23e4fe6
bug fixes
lous-e May 14, 2025
6d25994
fix: resnet50 not appearing
lous-e May 14, 2025
5f310b0
update gdown
zerOsand May 14, 2025
e3f0b21
fix: gdown
lous-e May 14, 2025
aac14e2
fix: gdown actually works
lous-e May 14, 2025
6df61ad
update images + readme
zerOsand May 14, 2025
17b2c0e
fix: test server
lous-e May 14, 2025
3eb649a
Merge branch 'facecropping-and-last-changes' of https://github.com/lo…
lous-e May 14, 2025
3d1ee34
fix: markdown on desktop app
lous-e May 14, 2025
6ed0ec0
update README
massbchou May 14, 2025
243837c
udpate datetime
zerOsand May 14, 2025
157951d
final
lous-e May 14, 2025
d9b3f96
actually final
lous-e May 14, 2025
e22a481
Merge pull request #4 from lous-e/facecropping-and-last-changes
lous-e May 14, 2025
bb04a85
fix lint
lous-e May 14, 2025
ac1dd5c
Merge pull request #5 from lous-e/facecropping-and-last-changes
lous-e May 14, 2025
9615c57
Fixed metadata test
prasannals May 16, 2025
76c163a
Merge pull request #7 from lous-e/facecropping-and-last-changes
lous-e May 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,16 @@ jobs:
pip install poetry
poetry install --with api --with dev

- name: Create required files
run: |
pip install gdown
mkdir src/deepfake-detection/deepfake_detection/onnx_models
gdown "1tFHTXCGy0hWRFH2H9MP9MpaBJvyHbW0u" --fuzzy -O src/deepfake-detection/deepfake_detection/onnx_models/bnext_M_dffd_model.onnx --continue
gdown "1J1PjIFekJ0LEp3MxJ8ReOBmnqe5-4na6" --fuzzy -O src/deepfake-detection/deepfake_detection/onnx_models/bnext_S_coco_model.onnx --continue
gdown "1z1R8E8xXvIhIgRGSK0HWg3-T0n750b6l" --fuzzy -O src/deepfake-detection/deepfake_detection/onnx_models/dima_transformer.onnx --continue
gdown "1Ve2n-qq-zwfeBJLmeCV2XneHGb37Bgjq" --fuzzy -O src/deepfake-detection/deepfake_detection/onnx_models/transformer_model_deepfake.onnx --continue
gdown "1rURFeRxBrNxdQpUssAPi2bXPwURLOkgl" --fuzzy -O src/deepfake-detection/deepfake_detection/onnx_models/resnet50_fakes.onnx --continue
gdown "1TbP3X95jRNsgBkulYJrblF49IAyE6nvn" --fuzzy -O src/deepfake-detection/deepfake_detection/onnx_models/face_detector.onnx --continue

- name: Run tests
run: poetry run pytest
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,7 @@ rescuebox/bin/
rescuebox/lib/
rescuebox/pyvenv.cfg
src/rb-api/rb/api/static/index/main.js
**/*/.DS_Store
**/*/.DS_Store


src/deepfake-detection/deepfake_detection/onnx_models/
643 changes: 474 additions & 169 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ onnxruntime = "1.21.0"
opencv-python = ">=4.11.0.86,<5.0.0.0"
ollama = ">=0.4.7,<0.5.0"
pypdf2 = ">=3.0.1,<4.0.0"
pandas = ">=2.2.3,<3.0.0"
pillow = ">=11.2.1,<12.0.0"
Copy link
Copy Markdown
Collaborator

@nb950 nb950 Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notice that this Python package has a special license open source MIT-CMU License req
https://github.com/python-pillow/Pillow/blob/main/LICENSE
please add this too


rb-lib = { path = "src/rb-lib", develop = true }

Expand All @@ -30,6 +32,8 @@ doc-parser = { path = "src/doc-parser", develop = true }
audio-transcription = { path = "src/audio-transcription", develop = true }
age-and-gender-detection = { path = "src/age_and_gender_detection", develop = true }
text-summary = {path = "src/text-summary", develop = true}
deepfake-detection = {path = "src/deepfake-detection", develop = true}


# Don't add new packages here, add them appropriately in the list above
beautifulsoup4 = "^4.13.3"
Expand Down
5 changes: 4 additions & 1 deletion rescuebox/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
APP_NAME as AUDIO_APP_NAME,
) # type: ignore
from text_summary.main import app as text_summary_app, APP_NAME as TEXT_SUM_APP_NAME # type: ignore

from age_and_gender_detection.main import app as age_gender_app, APP_NAME as AGE_GENDER_APP_NAME # type: ignore
from deepfake_detection.main import app as deepfake_detection_app, APP_NAME as DEEPFAKE_APP_NAME # type: ignore

# Import plugin modules
from doc_parser.main import app as doc_parser_app # type: ignore
Expand All @@ -30,6 +30,9 @@ class RescueBoxPlugin:
),
RescueBoxPlugin(age_gender_app, AGE_GENDER_APP_NAME, "Age and Gender Classifier"),
RescueBoxPlugin(text_summary_app, TEXT_SUM_APP_NAME, "Text summarization library"),
RescueBoxPlugin(
deepfake_detection_app, DEEPFAKE_APP_NAME, "Deepfake Image Detection"
),
]

# Ensure this module is importable
Expand Down
428 changes: 428 additions & 0 deletions src/deepfake-detection/LICENSES/LICENSE_H3D_dataset.txt

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions src/deepfake-detection/LICENSES/LICENSE_PyYAML.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2017-2021 Ingy döt Net
Copyright (c) 2006-2016 Kirill Simonov

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
19 changes: 19 additions & 0 deletions src/deepfake-detection/LICENSES/LICENSE_SQLALchemy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright 2005-2025 SQLAlchemy authors and contributors <see AUTHORS file>.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
7 changes: 7 additions & 0 deletions src/deepfake-detection/LICENSES/LICENSE_WebOb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) 2007 Ian Bicking and Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 changes: 21 additions & 0 deletions src/deepfake-detection/LICENSES/LICENSE_adjusttext
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Ilya Flyamer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
19 changes: 19 additions & 0 deletions src/deepfake-detection/LICENSES/LICENSE_anykeystore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2012 Michael Merickel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
20 changes: 20 additions & 0 deletions src/deepfake-detection/LICENSES/LICENSE_certifi
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
This package contains a modified version of ca-bundle.crt:

ca-bundle.crt -- Bundle of CA Root Certificates

This is a bundle of X.509 certificates of public Certificate Authorities
(CA). These were automatically extracted from Mozilla's root certificates
file (certdata.txt). This file can be found in the mozilla source tree:
https://hg.mozilla.org/mozilla-central/file/tip/security/nss/lib/ckfw/builtins/certdata.txt
It contains the certificates in PEM format and therefore
can be directly used with curl / libcurl / php_curl, or with
an Apache+mod_ssl webserver for SSL client authentication.
Just configure this file as the SSLCACertificateFile.#

***** BEGIN LICENSE BLOCK *****
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
one at http://mozilla.org/MPL/2.0/.

***** END LICENSE BLOCK *****
@(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $
26 changes: 26 additions & 0 deletions src/deepfake-detection/LICENSES/LICENSE_cffi
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

Except when otherwise stated (look for LICENSE files in directories or
information at the beginning of each file) all software and
documentation is licensed as follows:

The MIT License

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

21 changes: 21 additions & 0 deletions src/deepfake-detection/LICENSES/LICENSE_charset
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 TAHRI Ahmed R.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading