Skip to content

Commit

Permalink
Readme final
Browse files Browse the repository at this point in the history
  • Loading branch information
lriveraBanco committed Apr 28, 2024
1 parent cc02b39 commit c147ad4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 43 deletions.
44 changes: 17 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
## This project has been discontinued
## Sobre este proyecto

Yes, you can still use this software. It just won't recieve any updates now.

> The reason behind shutting the project down is that a developer with write access to the code published a [problematic video](https://github.com/s0md3v/roop/commit/cf7ba1caf932e8c9f39d972100f74022e7372c27) to the documentation of the project. This happened while I was taking a break from the project in July-Aug 2023. It went unnoticed for 2 weeks until someone reached out to me to talk about this project. It was a complete breach of trust for me and I decided that I do not have the interest or time to oversee the development of a software with such ethical issues.
> I thank all the amazing people who contributed to this project and made what it is in it's final form.

# Roop

> Take a video and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training.
> Graba un vídeo y reemplaza la cara que aparece con una cara de tu elección. Sólo necesitas una imagen del rostro deseado. Sin conjunto de datos, sin entrenamiento.
[![Build Status](https://img.shields.io/github/actions/workflow/status/s0md3v/roop/ci.yml.svg?branch=main)](https://github.com/s0md3v/roop/actions?query=workflow:ci)

## Installation
[![Build Status](https://img.shields.io/github/actions/workflow/status/s0md3v/roop/ci.yml.svg?branch=main)](https://github.com/s0md3v/roop/actions?query=workflow:ci)

Be aware, the installation needs technical skills and is not for beginners. Please do not open platform and installation related issues on GitHub. We have a very helpful [Discord](https://discord.com/invite/Y9p4ZQ2sB9) community that will guide you to install roop.
## Instalación

[Basic](https://github.com/s0md3v/roop/wiki/1.-Installation) - It is more likely to work on your computer, but will be quite slow
Tenga en cuenta que la instalación requiere conocimientos técnicos y no es para principiantes. No abra problemas relacionados con la plataforma y la instalación en GitHub..

[Acceleration](https://github.com/s0md3v/roop/wiki/2.-Acceleration) - Unleash the full potential of your CPU and GPU


## Usage
## Uso

Start the program with arguments:
Inicie el programa con argumentos:

```
python run.py [options]
Expand Down Expand Up @@ -52,29 +46,25 @@ python run.py [options]

### Headless

Using the `-s/--source`, `-t/--target` and `-o/--output` argument will run the program in headless mode.


## Disclaimer
El uso del `-s/--source`, `-t/--target` y el `-o/--output` argumento ejecutará el programa en modo sin headless.

This software is designed to contribute positively to the AI-generated media industry, assisting artists with tasks like character animation and models for clothing.

We are aware of the potential ethical issues and have implemented measures to prevent the software from being used for inappropriate content, such as nudity.
## Descargo de responsabilidad

Users are expected to follow local laws and use the software responsibly. If using real faces, get consent and clearly label deepfakes when sharing. The developers aren't liable for user actions.
Este software está diseñado para contribuir positivamente a la industria de los medios generados por IA, ayudando a los artistas con tareas como animación de personajes y modelos de ropa.

Somos conscientes de los posibles problemas éticos y hemos implementado medidas para evitar que el software se utilice para contenido inapropiado, como desnudos.

## Licenses
Se espera que los usuarios sigan las leyes locales y utilicen el software de manera responsable. Si usa caras reales, obtenga el consentimiento y etiquete claramente los deepfakes cuando los comparta. Los desarrolladores no son responsables de las acciones de los usuarios.

Our software uses a lot of third party libraries as well pre-trained models. The users should keep in mind that these third party components have their own license and terms, therefore our license is not being applied.

## Licencias

## Credits
Nuestro software utiliza muchas bibliotecas de terceros, así como modelos previamente entrenados. Los usuarios deben tener en cuenta que estos componentes de terceros tienen su propia licencia y términos, por lo que no se aplica nuestra licencia.

- [deepinsight](https://github.com/deepinsight) for their [insightface](https://github.com/deepinsight/insightface) project which provided a well-made library and models.
- all developers behind the libraries used in this project

## Creditos

## Documentation
- [deepinsight](https://github.com/deepinsight) y [insightface](https://github.com/deepinsight/insightface) por su proyecto insightface , que proporcionó una biblioteca y modelos bien hechos.
todos los desarrolladores detrás de las bibliotecas utilizadas en este proyecto

Read the [documentation](https://github.com/s0md3v/roop/wiki) for a deep dive.
2 changes: 1 addition & 1 deletion roop/Frontend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def transform():

@app.route('/download')
def download():
file_path = '/content/Proyecto_ia/roop/resultados/resultado.mp4'
file_path = '/content/Proyecto_ia/resultados/resultado.mp4'
return send_file(file_path, as_attachment=True)


Expand Down
36 changes: 21 additions & 15 deletions roop/Frontend/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</ul>
{% endif %}
{% endwith %}

<div class="container">

<div class="slide">
Expand All @@ -52,7 +52,8 @@
<button id="close-btn-1" style="display: none;">Cerrar</button>
<canvas id="canvas-1" style="display: none;"></canvas>
<video id="video-1" style="display: none;"></video>
<button id="transform-btn-1" data-name="Doctor_Strange" data-video="Doctor_Strange.mp4">Transformar</button>
<button id="transform-btn-1" data-name="Doctor_Strange"
data-video="Doctor_Strange.mp4">Transformar</button>
<button id="download-btn">Descargar</button>
</div>
</div>
Expand All @@ -65,7 +66,8 @@
<button id="close-btn-2" style="display: none;">Cerrar</button>
<canvas id="canvas-2" style="display: none;"></canvas>
<video id="video-2" style="display: none;"></video>
<button id="transform-btn-2" data-name="Wanda" data-video="Wanda.mp4">Transformar</button>
<button id="transform-btn-2" data-name="Wanda"
data-video="Wanda.mp4">Transformar</button>
<button id="download-btn">Descargar</button>
</div>
</div>
Expand All @@ -74,11 +76,12 @@
<div class="name">Captain America</div>
<div class="des">¿Que tanto te pareces a tu superheroe favorito?
</div>
<button id="capture-btn-3" data-name ="Captain_America">Tomar Foto</button>
<button id="capture-btn-3" data-name="Captain_America">Tomar Foto</button>
<button id="close-btn-3" style="display: none;">Cerrar</button>
<canvas id="canvas-3" style="display: none;"></canvas>
<video id="video-3" style="display: none;"></video>
<button id="transform-btn-3" data-name="Captain_America" data-video="Captain_America.mp4">Transformar</button>
<button id="transform-btn-3" data-name="Captain_America"
data-video="Captain_America.mp4">Transformar</button>
<button id="download-btn">Descargar</button>
</div>
</div>
Expand All @@ -91,20 +94,22 @@
<button id="close-btn-4" style="display: none;">Cerrar</button>
<canvas id="canvas-4" style="display: none;"></canvas>
<video id="video-4" style="display: none;"></video>
<button id="transform-btn-4" data-name="Captain_Marvel" data-video="Captain_Marvel.mp4">Transformar</button>
<button id="transform-btn-4" data-name="Captain_Marvel"
data-video="Captain_Marvel.mp4">Transformar</button>
<button id="download-btn">Descargar</button>
</div>
</div>
<div class="item" style="background-image: url(static/images/Spiderman.webp);">
<div class="item" style="background-image: url(static/images/aquaman.jpg);">
<div class="content">
<div class="name">Spiderman</div>
<div class="name">Aquaman</div>
<div class="des">¿Que tanto te pareces a tu superheroe favorito?
</div>
<button id="capture-btn-5" data-name="Spiderman">Tomar Foto</button>
<button id="capture-btn-5" data-name="Aquaman">Tomar Foto</button>
<button id="close-btn-5" style="display: none;">Cerrar</button>
<canvas id="canvas-5" style="display: none;"></canvas>
<video id="video-5" style="display: none;"></video>
<button id="transform-btn-5" data-name="Spiderman" data-video="Spiderman.mp4">Transformar</button>
<button id="transform-btn-5" data-name="Aquaman"
data-video="Aquaman.mp4">Transformar</button>
<button id="download-btn">Descargar</button>
</div>
</div>
Expand All @@ -117,7 +122,8 @@
<button id="close-btn-6" style="display: none;">Cerrar</button>
<canvas id="canvas-6" style="display: none;"></canvas>
<video id="video-6" style="display: none;"></video>
<button id="transform-btn-6" data-name="Wonder_Woman" data-video="Wonder_Woman.mp4">Transformar</button>
<button id="transform-btn-6" data-name="Wonder_Woman"
data-video="Wonder_Woman.mp4">Transformar</button>
<button id="download-btn">Descargar</button>
</div>
</div>
Expand All @@ -128,11 +134,11 @@
<button class="prev"><i class="fa-solid fa-arrow-left"></i></button>
<button class="next"><i class="fa-solid fa-arrow-right"></i></button>
</div>

</div>

<script>
for (let i = 1; i <= 6; i++) {
for (let i = 1; i <= 6; i++) {
const captureBtn = document.getElementById(`capture-btn-${i}`);
const closeBtn = document.getElementById(`close-btn-${i}`);
const canvas = document.getElementById(`canvas-${i}`);
Expand Down Expand Up @@ -214,14 +220,14 @@

</script>
<script>
for (let i = 1; i <= 6; i++) {
for (let i = 1; i <= 6; i++) {
const transformBtn = document.getElementById(`transform-btn-${i}`);
const characterName = transformBtn.getAttribute('data-name');
const characterVideo = transformBtn.getAttribute('data-video');

transformBtn.addEventListener('click', () => {
// Ejecutar el comando de transformación
const command = `cd "/content/Proyecto_ia" && python run.py -s "/content/Proyecto_ia/images/${characterName}.png" -t "/content/Proyecto_ia/videos/${characterVideo}.mp4" -o "resultados/resultado.mp4" --keep-frames --keep-fps --temp-frame-quality 1 --output-video-quality 1 --execution-provider cuda --frame-processor face_swapper face_enhancer`;
const command = `cd "/content/Proyecto_ia" && python run.py -s "/content/Proyecto_ia/images/${characterName}.png" -t "/content/Proyecto_ia/videos/${characterName}.mp4" -o "/content/Proyecto_ia/resultados/resultado.mp4" --keep-frames --keep-fps --temp-frame-quality 1 --output-video-quality 1 --execution-provider cuda --frame-processor face_swapper face_enhancer`;
fetch('/transform', {
method: 'POST',
body: JSON.stringify({ command: command }),
Expand Down

0 comments on commit c147ad4

Please sign in to comment.