{"id":15664123,"url":"https://github.com/junyanz/mirrormirror","last_synced_at":"2025-05-06T18:48:51.081Z","repository":{"id":72158700,"uuid":"48896113","full_name":"junyanz/MirrorMirror","owner":"junyanz","description":"An expression training App that helps users mimic their own expressions.","archived":false,"fork":false,"pushed_at":"2020-08-05T01:22:03.000Z","size":62037,"stargazers_count":18,"open_issues_count":0,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-31T01:51:18.268Z","etag":null,"topics":["3d-face","computer-vision","face-swap"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/junyanz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-02T02:28:02.000Z","updated_at":"2025-03-05T03:27:23.000Z","dependencies_parsed_at":"2023-05-22T11:30:36.619Z","dependency_job_id":null,"html_url":"https://github.com/junyanz/MirrorMirror","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junyanz%2FMirrorMirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junyanz%2FMirrorMirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junyanz%2FMirrorMirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junyanz%2FMirrorMirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junyanz","download_url":"https://codeload.github.com/junyanz/MirrorMirror/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252749635,"owners_count":21798555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d-face","computer-vision","face-swap"],"created_at":"2024-10-03T13:41:22.304Z","updated_at":"2025-05-06T18:48:51.075Z","avatar_url":"https://github.com/junyanz.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MirrorMirror\n#### [Project](http://efrosprojects.eecs.berkeley.edu/mirrormirror/) | [Paper](http://efrosprojects.eecs.berkeley.edu/mirrormirror/mirrormirror.pdf)\nContact: Jun-Yan Zhu (junyanz at cs dot cmu dot edu)\n\n\n## Overview\nThis is the authors' implementation of Expression Training App described in:  \nMirror Mirror: Crowdsourcing Better Portraits  \n[Jun-Yan Zhu](https://www.cs.cmu.edu/~junyanz/), [Aseem Agarwala](http://www.agarwala.org/), [Alexei A. Efros](https://people.eecs.berkeley.edu/~efros/), [Eli Shechtman](https://research.adobe.com/person/eli-shechtman/) and [Jue Wang](https://www.juew.org/)  \nIn ACM Transactions on Graphics (Proceedings of SIGGRAPH Asia 2014)\n\nThis App is used for training users to mimic their best expressions. The App takes input from a webcam/video and displays the current expression along with its attractiveness and seriousness scores, computed in real-time.  The user can specify a target expression to mimic. The App then shows three windows; the current expression, the target expression, and an aligned and a blended cross-fade between the two. The cross-fade oscillates between the target and current expression once per two seconds, so that the subject can examine differences between the two expressions. See Section 6 in the original paper for details.\n\nThis software includes two modules:  \n(1) Learning attractive/serious SVM models given expressions and annotations.  \n(2) Expression Training App.  \n\nThe code can only be used for non-commercial purposes. Please cite our paper if you use our code and data for your research.\n\n\n## Third party libraries\n* OpenCV:  \n  - sudo apt-get install libopencv-dev\n* OpenGL and GLUT:  \n  - sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev  \n  - sudo apt-get install libxmu-dev libxi-dev  \n* HOG feature code (included)  \n* CLM Tracker by Jason Saragih (included)  \n* LIBSVM (included)  \n\n\n## Installation (Linux)\n* Download and unzip the code.\n* mkdir cbuild\n* cd cbuild\n* cmake -DCMAKE_BUILD_TYPE=Release ..\n* make\n\n\n## Quick Examples\nAn example for learning attractive/serious svm models:  \n./MirrorMirror -m 0 ./data/test/ ./data/models/\n\nAn example for Expression Training App using trained model and video file:  \n./MirrorMirror -m 1 -i ./data/video.avi ./data/target.png ./data/models/\n\nAn example for Expression Training App using cross-subject model and webcam:  \n./MirrorMirror -m 1 your/target/image/ ./models/svm/\n\n\n## Command Usage ([ ] : options)\nCommand line interface: ./MirrorMirror [-v verbose] [-m mode] [-i input_video] [-s save_dir] data_file model_dir  \n\n-v verbose: shows details about the runtime output (default = 1)  \n  - 0 -- no output  \n  - 1 -- some output  \n\n-m mode: set the training mode (default = 0)  \n  - 0 -- learning attractive/serious svm models  \n  - 1 -- expression training App  \n\n-i input_video: specify the video input; if no video is specified, the program will use a webcam.  \n\n-s save_dir: specify the directory where the results will be saved.  \n\ndata_file: set the directory/path of the input data:  \n- if m = 0, data_file specifies the directory of images and scores used for SVM training;\n- if m = 1, data_file is the path of the selected target expression.  \n\nmodel_dir: set the directory for svm models.\n - Cross-subject svm models trained on 11 subjects are included: ./models/svm\n\n\n## User Interaction\n1. The program displays three windows:  \n   - The \"Target Expression\" window shows the target expression selected by the user.\n   - The \"Current Expression\" window shows the current expression either from video or from a webcam.\n   - The \"MirrorMirror\" window shows an aligned and a blended cross-fade between the target. It also shows the attractiveness and seriousness scores of current expression.\n\n2. User Interaction: \"MirrorMirror\" window takes the user's keyboard input.\n   - 's':  start the tracker.  \n   - 'r':  restart the tracker if the tracker fails.  \n   - 'p':  save the current expression  \n   - 'd':  pause the system to see fine-grained differences at a frozen moment of time.\n   - 'q':  quite the program\n\n\n## Training Data Preparation\nThe training data directory should contain:  \n(1) /imgs/: expression images.  \n(2) /scores/: attractive/serious scores  \n(3) /image.txt: image list. See \"./data/test/\" for an example.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunyanz%2Fmirrormirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunyanz%2Fmirrormirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunyanz%2Fmirrormirror/lists"}