diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b179440 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.DS_Store +__pycache__ +__pycache__/ diff --git a/README.md b/README.md index 0bee135..dd4d3a4 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

-# EraseID - v2.4.0 +# EraseID - v2.4.1 [![Official Website](https://img.shields.io/badge/Official%20Website-piktid.com-blue?style=flat&logo=world&logoColor=white)](https://piktid.com) [![Discord Follow](https://dcbadge.vercel.app/api/server/FJU39e9Z4P?style=flat)](https://discord.com/invite/FJU39e9Z4P) @@ -68,8 +68,20 @@ If you want to change also the hair and change all the faces in the photo, use t $ python3 main.py --hair --all_faces ``` +## Change facial expression + + Open In Colab + + +It is possible to edit the original identity in your photos! Use keywords to add a smile or create a surprised look on all the faces. +Choose the EXPRESSION value from the ones available in `cfe_keywords.py` + +```bash +$ python3 main.py --all_faces --change_expression_flag --new_expression EXPRESSION +``` + ## Consistent identity (swap generated faces) -It is now possible to use the same generated identity in multiple photos! +It is also possible to use the same generated identity in multiple photos! To save the generated identity into your database, use the command: ```bash @@ -83,12 +95,12 @@ If you want to reuse 'pippo' in different photos, use the command: $ python3 main.py --identity_name 'pippo' ``` -## Consistent identity (swap real faces, only for VERIFIED users) +## Consistent identity (swap real faces, see [SwapID](https://github.com/piktid/swapid)) Open In Colab -It is also possible to use the same real identity from a source image into multiple target photos. To avoid malicious uses, only verified trusted users have access to this feature. If you are interested, please contact us via Discord. +It is also possible to use the same real identity from a source image into multiple target photos. We *recommend* to visit [SwapID](https://swap.piktid.com) for this particular use case. Since SwapID utilizes the EraseID infrastructure, the results should be identical. To use a real identity from a source photo with local path 'mydir/myfile.jpg', use the command: ```bash @@ -102,21 +114,9 @@ If you want to swap also the hair and use an identity located at 'mylink/myfile. $ python3 main.py --filepath 'mydir/myfile.jpg' --identity_url 'mylink/myfile.jpg' --identity_name 'myidentityname' --hair ``` -It is possible to change the default consistent generation parameters, to do that use the command (you need to be a premium user) +It is possible to change the default consistent generation parameters, to do that use the command ```bash -$ python3 main.py --filepath 'mydir/myfile.jpg' --identity_filepath 'mydir/myfile.jpg' --identity_name 'myidentityname' --prompt_strength '0.5' --seed 0 -``` - -## Change facial expression - - Open In Colab - - -It is now possible to edit the original identity in your photos! Use keywords to add a smile or create a surprised look on all the faces. -Choose the EXPRESSION value from the ones available in `cfe_keywords.py` - -```bash -$ python3 main.py --all_faces --change_expression_flag --new_expression EXPRESSION +$ python3 main.py --filepath 'mydir/myfile.jpg' --identity_filepath 'mydir/myfile.jpg' --identity_name 'myidentityname' --prompt_strength '0.55' --seed 0 ``` ## Full-body skin tuner (BETA) diff --git a/cfe_keywords.py b/cfe_keywords.py index e76e15f..5af71a3 100644 --- a/cfe_keywords.py +++ b/cfe_keywords.py @@ -8,7 +8,9 @@ "disgusted", "fearful", "happy", + "neutral", "pathetic", + "sad", "surprised", "suspicious", ], @@ -22,6 +24,8 @@ "Gaze": [ "left", - "right", + "right", + "up", + "down", ] } diff --git a/eraseid_api.py b/eraseid_api.py index cb56d22..9a07375 100644 --- a/eraseid_api.py +++ b/eraseid_api.py @@ -192,7 +192,7 @@ def selection_call(image_id, selected_faces_list, TOKEN_DICTIONARY): # try with new TOKEN response = requests.post(URL_API+'/selection', headers={'Authorization': 'Bearer '+TOKEN}, - json={'flag_sync': True, 'id_image': image_id, 'selected_faces':selected_faces_list}, + json={'flag_sync': True, 'id_image': image_id, 'selected_faces': selected_faces_list}, # timeout=100, ) response_json = json.loads(response.text)