58 Коммитов

Автор SHA1 Сообщение Дата
pre-commit-ci[bot]
f89fa4e519
[pre-commit.ci] pre-commit autoupdate (#46)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0)
- [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0)
- [github.com/s-weigand/flake8-nb: v0.5.0 → v0.5.2](https://github.com/s-weigand/flake8-nb/compare/v0.5.0...v0.5.2)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update .pre-commit-config.yaml

* run hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Inga Ulusoy <inga.ulusoy@uni-heidelberg.de>
2023-03-30 19:39:21 +02:00
Petr Andriushchenko
e33035bc68
Merge pull request #66 from ssciwr/text-summasy
add text summary
2023-03-30 13:35:43 +02:00
Inga Ulusoy
f03c3a197c add test data file 2023-03-30 11:23:57 +02:00
Inga Ulusoy
cf1e1b83d7 add text summary 2023-03-30 11:23:01 +02:00
Petr Andriushchenko
a5c43b6488
Test debugging (#62)
* deleted lavis from utils

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed test_objects

* added 'not gcv' to CI

* fixed multimodal search and summary tests

* disable doc build on PR for now

* restrict ipywidgets version to avoid dummycomm error

* limit deepface version

* original repositories for retinaface lavis

* update gcv test results

* update display test outputs

* update test env

* run all tests

* wo xdist to avoid segfault

* remove widgets ref

* skip long-running tests

* skip long

* verbose codecov upload

* refactor summary test 2

* finish summary test refactor

* reduce memory overhead of SummaryDetector

* remove VQA models from self

* remove VQA models from self

* update notebook for changes

* update notebook for changes

* fixed multimodal search tests

* fixed tests in multimodal search after precommit

* run all tests

* update doc notebook for summary changes

* skip long-running multimodal

* exclude blip2 from testing

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Inga Ulusoy <inga.ulusoy@uni-heidelberg.de>
2023-03-30 10:33:05 +02:00
Inga Ulusoy
0ca9366980
update docs and google auth (#63)
* update notebooks and google auth

* update readme and text

* google cred

* update secret name

* add pandocto CI

* pandoc step

* install pandoc

* correct typo
2023-03-23 14:07:30 +01:00
Inga Ulusoy
6eff8b8145
Update doc (#61)
* add image summary notebook

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* pin deepface version to avoid bug with progress bar after update

* update actions version for checkout and python

* test ci without lavis

* no lavis for ci test

* merging

* return lavis

* change lavis to salesforce-lavis

* change pycocotools install method

* change pycocotools install method

* fix_pycocotools

* Downgrade Python

* back to 3.9 and remove pycocotools dependance

* instrucctions for windows

* missing comma after merge

* lavis only for ubuntu

* use lavis package name in install instead of git

* adding multimodal searching py and notebook

* exclude lavis on windows

* skip import on windows

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* reactivate lavis

* Revert "reactivate lavis"

This reverts commit ecdaf9d316e4b08816ba62da5e0482c8ff15b14e.

* Change input format for multimodal search

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix clip models

* account for new interface in init imports

* changed imports bec of lavis/windows

* fix if-else, added clip ViT-L-14=336 model

* fix code smells

* add model change function to summary

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed new model in summary.py

* fixed summary windget

* moved some function to utils

* fixed imort torch in utils

* added test_summary.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed opencv version

* added first test of multimodal_search.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed test

* removed windows in CI and added test in multimodal search

* change lavis from dependencies from pip ro git

* fixed blip2 model in test_multimodal_search.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed test multimodal search on cpu and gpu machines

* added test, fixed dependencies

* add -vv to pytest command in CI

* added test_multimodal_search tests

* fixed tests in test_multimodal_search.py

* fixed tests in test_summary

* changed CI and fixed test_multimodel search

* fixed ci

* fixed error in test multimodal search, changed ci

* added multimodal search test, added windows CI, added picture in test data

* CI debuging

* fixing tests in CI

* fixing test in CI 2

* fixing CI 3

* fixing CI

* added filtering function

* Brought back all tests after CI fixing

* changed CI one pytest by individual tests

* fixed opencv problem

* fix path for text, adjust result for new gcv

* remove opencv

* fixing cv2 error

* added opencv-contrib, change objects_cvlib

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixing tests in CI

* fixing CI testing

* fixing codecov in CI

* fixing codecov in CI

* run tests together; install opencv last

* update requirements for opencv dependencies

* first doc updates

* more changes to doc notebooks

---------

Co-authored-by: Petr Andriushchenko <pitandmind@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-03-22 10:56:10 +01:00
Petr Andriushchenko
2891c8a6ed
add image summary notebook (#57)
* add image summary notebook

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* pin deepface version to avoid bug with progress bar after update

* update actions version for checkout and python

* test ci without lavis

* no lavis for ci test

* merging

* return lavis

* change lavis to salesforce-lavis

* change pycocotools install method

* change pycocotools install method

* fix_pycocotools

* Downgrade Python

* back to 3.9 and remove pycocotools dependance

* instrucctions for windows

* missing comma after merge

* lavis only for ubuntu

* use lavis package name in install instead of git

* adding multimodal searching py and notebook

* exclude lavis on windows

* skip import on windows

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* reactivate lavis

* Revert "reactivate lavis"

This reverts commit ecdaf9d316e4b08816ba62da5e0482c8ff15b14e.

* Change input format for multimodal search

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix clip models

* account for new interface in init imports

* changed imports bec of lavis/windows

* fix if-else, added clip ViT-L-14=336 model

* fix code smells

* add model change function to summary

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed new model in summary.py

* fixed summary windget

* moved some function to utils

* fixed imort torch in utils

* added test_summary.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed opencv version

* added first test of multimodal_search.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed test

* removed windows in CI and added test in multimodal search

* change lavis from dependencies from pip ro git

* fixed blip2 model in test_multimodal_search.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixed test multimodal search on cpu and gpu machines

* added test, fixed dependencies

* add -vv to pytest command in CI

* added test_multimodal_search tests

* fixed tests in test_multimodal_search.py

* fixed tests in test_summary

* changed CI and fixed test_multimodel search

* fixed ci

* fixed error in test multimodal search, changed ci

* added multimodal search test, added windows CI, added picture in test data

* CI debuging

* fixing tests in CI

* fixing test in CI 2

* fixing CI 3

* fixing CI

* added filtering function

* Brought back all tests after CI fixing

* changed CI one pytest by individual tests

* fixed opencv problem

* fix path for text, adjust result for new gcv

* remove opencv

* fixing cv2 error

* added opencv-contrib, change objects_cvlib

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fixing tests in CI

* fixing CI testing

* cleanup objects

* fixing codecov in CI

* fixing codecov in CI

* run tests together; install opencv last

* update requirements for opencv dependencies

* moved lavis functions from utils to summary

* Remove lavis from utils.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add missing jupyter

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: iulusoy <inga.ulusoy@uni-heidelberg.de>
2023-03-22 10:28:09 +01:00
Inga Ulusoy
a6578cfdf3
Topic analysis (#53)
* add bertopic to requirements

* basic topic modeling

* topic modeling using BERT; bugfix if no text on post

* update for google colab

* Catch connection errors

* replace newline character with space

* move topic analysis into PostprocessText class

* set up dataflow topic analysis

* expose topic model to UI

* tests for class init

* tests for topic analysis

* more tests

* take care of carriage return on windows

* take care of carriage return on windows

* take care of carriage return on windows

* set encoding to ensure windows compatibility

* track encoding error

* more debug

* skip topic analysis debug

* windows fixes
2023-02-13 11:45:24 +01:00
Inga Ulusoy
0a017b10ec
version bumps and restrictions (#58)
* fix deepface version

* update actions versions
2023-01-30 12:00:13 +01:00
Inga Ulusoy
b0ae2f2c19
update install branch (#51) 2023-01-12 13:42:38 +01:00
Inga Ulusoy
5d033479ce
Set up colab (#50)
* lower python version for google colab

* faces working with colab

* text for colab

* fix dict update bug

* final edits for colab

* update readme with links

* load text models on demand

* update test

* fix typo; more description in readme

* remove optional keys
2023-01-12 12:57:14 +01:00
Inga Ulusoy
54728e02bb
Text cleanup and sentiment analysis (#49)
* update notebook

* comments

* add jupyterlab

* add text analysis capability

* add bool in tests

* add dependencies and spelling test

* add test sentiment

* update black pre-commit dependency for native nb support

* update black version, find better sentiment test

* test analyse_image
2023-01-11 12:58:02 +01:00
Inga Ulusoy
b585097f19
remove obsolete features (#48)
* reduce code smells

* account for transl. version change

* remove print statements

* remove imageai
2022-12-31 22:15:40 +01:00
Inga Ulusoy
4744ed5256
add sphinx documentation files (#47)
* add sphinx doc

* add github pages files

* create docs workflow

* add sphinx requirements

* add napoleon ext

* fix name typo
2022-12-20 19:49:39 +01:00
Dominic Kempf
c49a85bc65
[skip ci] Github Actions badge (#45)
There has been a backwards-incompatible change to shields.io badges for Github Actions. They now identify workflows by their filename instead of their name field.
2022-12-20 11:23:21 +01:00
Inga Ulusoy
25ed5881a1
Text 2 (#42)
* start with translate

* translate and clean - notebook

* spacy model in requirements

* translate in module

* clean in module

* upload coverage only for ubuntu

* update ubuntu version on runner

* update dependencies

* start tests for text

* skip gcv test

* fix age

* more text tests

* more text tests

* add comment

* test translation

* fix numpy version; add reference data for trans

* use utf-8 for windows
2022-12-19 15:03:05 +01:00
Dominic Kempf
f99d15cf40
Restrict the scope of facial expression recognition by thresholding likelihood (#38)
* Apply thresholding to restrict the scope of facial expression recognition

* fix test dict faces

* remove approx

* do not ignore data in subdirs

* where does test_display come from

* remove face analysis duplication

* imageai sneaked into ci

Co-authored-by: Inga Ulusoy <inga.ulusoy@uni-heidelberg.de>
2022-12-13 13:15:56 +01:00
Dominic Kempf
ef305ee94c
Fix ID generation for relative paths (#35)
So far, there was implicit assumption on the used paths being absolute.

Co-authored-by: Inga Ulusoy <inga.ulusoy@uni-heidelberg.de>
2022-12-13 11:33:34 +01:00
pre-commit-ci[bot]
81838d0b86
[pre-commit.ci] pre-commit autoupdate (#34)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.10.0 → 22.12.0](https://github.com/psf/black/compare/22.10.0...22.12.0)
- [github.com/pycqa/flake8: 5.0.4 → 6.0.0](https://github.com/pycqa/flake8/compare/5.0.4...6.0.0)
- [github.com/s-weigand/flake8-nb: v0.5.0 → v0.5.2](https://github.com/s-weigand/flake8-nb/compare/v0.5.0...v0.5.2)

* fix flake8-nb version

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Inga Ulusoy <inga.ulusoy@uni-heidelberg.de>
2022-12-13 11:33:20 +01:00
Inga Ulusoy
6e7df1eb9f
fix code smells (#39)
* fix code smells

* circumvent code coverage
2022-10-27 13:35:37 +02:00
Inga Ulusoy
27732c5fab
Tests (#37)
* add py test

* update dependencies and markers

* Update ci.yml

* fix linting

* trying with editable install for cov

* fix code smells

* fix code smells

Co-authored-by: xianghe ma <maxianghe@outlook.com>
2022-10-27 11:17:42 +02:00
Inga Ulusoy
9b3e3796fa
test on win (#33)
* test on win

* fix linter issues
2022-10-17 10:43:42 +02:00
xianghe ma
d07c54b096 add crop posts 2022-10-14 01:20:47 +02:00
pre-commit-ci[bot]
57cfb41aa0
[pre-commit.ci] pre-commit autoupdate (#31)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0)
- [github.com/s-weigand/flake8-nb: v0.5.0 → v0.5.2](https://github.com/s-weigand/flake8-nb/compare/v0.5.0...v0.5.2)

* fix flake8 version

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Inga Ulusoy <inga.ulusoy@uni-heidelberg.de>
2022-10-13 14:39:33 +02:00
Inga Ulusoy
37d07da98a
Accuracy test (#32)
* Create ci.yml

* include pytest

* Update pyproject.toml

* include pytest-cov

* use approx in pytest

* Update test_faces.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add coverage yaml

* reduce passing grade

* use copy instead of symlink on windows

* crude attempt at calculating deviations

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-13 14:32:45 +02:00
Inga Ulusoy
cf226ce535
Include badges (#30)
* added badges

* Update README.md

* correct language detection of the package
2022-10-05 13:43:12 +02:00
Inga Ulusoy
2dd1a7952f
Create ci.yml (#29)
* Create ci.yml

* include pytest

* Update pyproject.toml

* include pytest-cov

* use approx in pytest

* Update test_faces.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add coverage yaml

* reduce passing grade

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-05 11:25:48 +02:00
pre-commit-ci[bot]
1f8166e731
[pre-commit.ci] pre-commit autoupdate (#28)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/kynan/nbstripout: 0.6.0 → 0.6.1](https://github.com/kynan/nbstripout/compare/0.6.0...0.6.1)

* reduce flake8-nb version to keep from failing

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Inga Ulusoy <inga.ulusoy@uni-heidelberg.de>
2022-10-04 13:06:08 +02:00
xiaohemaikoo
fdcb228294
M objdect (#23)
* colors expression by KMean algorithm

* object detection by imageai

* object detection by cvlib

* add encapsulation of object detection

* remove encapsulation of objdetect v0

* objects expression to dict

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added imageai to requirements

* add objects to dictionary

* update for AnalysisMethod baseline

* add objects dection support explore_analysis display

* extend python version of misinf to allow imageai

* account for older python

* use global functionality for dict to csv convert

* update for docker build

* docker will build now but ipywidgets still not working

* test code

* include test data folder in repo

* add some sample images

* load cvs labels to dict

* add test data

* retrigger checks

* add map to human coding

* get orders from dict, missing dep

* add module to test accuracy

* retrigger checks

* retrigger checks

* now removing imageai

* removed imageai

* move labelmanager to analyse

* multiple faces in mydict

* fix pre-commit issues

* map mydict

* hide imageai

* objects default using cvlib, isolate and disable imageai

* correct python version

* refactor faces tests

* refactor objects tests

* sonarcloud issues

* refactor utils tests

* address code smells

* update readme

* update notebook without imageai

Co-authored-by: Ma Xianghe <825074348@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: iulusoy <inga.ulusoy@uni-heidelberg.de>
2022-10-04 11:34:44 +02:00
pre-commit-ci[bot]
f5d24a1b1d
[pre-commit.ci] pre-commit autoupdate (#25)
updates:
- [github.com/psf/black: 22.6.0 → 22.8.0](https://github.com/psf/black/compare/22.6.0...22.8.0)
- [github.com/s-weigand/flake8-nb: v0.4.0 → v0.5.2](https://github.com/s-weigand/flake8-nb/compare/v0.4.0...v0.5.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-09-21 21:40:21 +02:00
Dominic Kempf
0cca224cd0
Merge pull request #27 from ssciwr/ipywidgets-8
ipywidgets 8 was released
2022-09-05 10:30:52 +02:00
Dominic Kempf
9eb9308320 ipywidgets 8 was released 2022-09-05 10:23:25 +02:00
Inga Ulusoy
d4cda187e3
Facial expression dict (#24)
* convert into dict output

* faces class

* return cleaned dict

* empty methods that are required

* with dict updates

* with dominant emotion confidence as tuple

* multiple images

* update notebook
2022-08-17 23:00:46 +02:00
pre-commit-ci[bot]
d273e7a2e3
[pre-commit.ci] pre-commit autoupdate (#21)
updates:
- [github.com/pycqa/flake8: 5.0.2 → 5.0.4](https://github.com/pycqa/flake8/compare/5.0.2...5.0.4)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-15 13:49:58 +02:00
Inga Ulusoy
995cfec923
dict handling down to and from analysis routines (#19) 2022-08-07 20:48:21 +02:00
pre-commit-ci[bot]
90c6087fdf
[pre-commit.ci] pre-commit autoupdate (#20)
updates:
- [github.com/pycqa/flake8: 4.0.1 → 5.0.2](https://github.com/pycqa/flake8/compare/4.0.1...5.0.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-02 11:55:49 +02:00
pre-commit-ci[bot]
bef4940d04
[pre-commit.ci] pre-commit autoupdate (#8)
updates:
- [github.com/kynan/nbstripout: 0.5.0 → 0.6.0](https://github.com/kynan/nbstripout/compare/0.5.0...0.6.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-07-27 22:43:33 +02:00
Dominic Kempf
be04f79933
Fix installation into Docker image (#7)
* read image into nb

* test

* added keras-ocr and google vision

* google cloud vision by far the best

* setting up docker for text 1

* move widgets and analysis to display module

* move widgets and analysis to display module - 2

* text on image through widgets

* Fix installation into Docker image

* Install C++ compiler, not only C
* Automatically install requirements.txt stuff
* Write pytesseract into requirements file

Co-authored-by: iulusoy <inga.ulusoy@uni-heidelberg.de>
2022-07-27 22:43:16 +02:00
Inga Ulusoy
446da693e3
Text on image 1 (#4)
* read image into nb

* test

* added keras-ocr and google vision

* google cloud vision by far the best

* setting up docker for text 1

* move widgets and analysis to display module

* move widgets and analysis to display module - 2

* text on image through widgets
2022-07-27 22:41:13 +02:00
Dominic Kempf
7aa1247766
Merge pull request #6 from ssciwr/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-07-19 09:36:17 +02:00
pre-commit-ci[bot]
0ec2a2793a
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/s-weigand/flake8-nb: v0.3.1 → v0.4.0](https://github.com/s-weigand/flake8-nb/compare/v0.3.1...v0.4.0)
2022-07-18 17:45:47 +00:00
Dominic Kempf
8df9522550
Merge pull request #5 from ssciwr/three-faces
Detect up to 3 faces
2022-07-18 13:37:44 +02:00
Dominic Kempf
9b1a980a76 Detect up to 3 faces 2022-07-18 13:35:54 +02:00
Dominic Kempf
00f64055a4
Merge pull request #3 from ssciwr/facemask-detection
Facemask detection + On-demand resource handling
2022-07-14 14:56:04 +02:00
Dominic Kempf
a6a4d4aff0 Add a prefetching mechanism for trained models 2022-07-14 14:52:54 +02:00
Dominic Kempf
547e31a1c7 Use pooch instead of bundling pre-trained model 2022-07-14 11:30:12 +02:00
Dominic Kempf
81f8f91bc0 Include a face mask detection model 2022-07-13 17:20:01 +02:00
Dominic Kempf
2d06cd290a Use a widget layout for exploration that shows all filenames 2022-07-13 16:22:26 +02:00
Dominic Kempf
3d67b2968d
Merge pull request #2 from ssciwr/deepface-exploration
Add DeepFace exploration notebook and Python package
2022-07-13 13:56:52 +02:00