Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Arquivos temporários
*.pyc
__pycache__/
*.py[cod]
*$py.class

# Jupyter Notebook
.ipynb_checkpoints
*/.ipynb_checkpoints/*

# Ambientes virtuais
.venv/
venv/
ENV/
env/

# IDEs
.vscode/
.idea/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db
desktop.ini

# Credenciais (NUNCA fazer commit)
*secret*.json
*credentials*.json
*cookie*.txt
*api*.txt
*.pem

# Arquivos de processamento
VIRALS/
*.mp4
*.mp3
*.wav

# Scripts temporários
add_docs.py
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.)
169 changes: 169 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,172 @@
# 🎬 ViralCutter - Smooth Face Tracking Edition

[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/masterface77/ViralCutter/blob/smooth-zoom/ViralCutter-SmoothZoom.ipynb)
[![Open in Kaggle](https://kaggle.com/static/images/open-in-kaggle.svg)](https://www.kaggle.com/code/levireis77/viralcutter-cyclic-smooth-zoom-edition-kag)
[![Discord](https://dcbadge.limes.pink/api/server/tAdPHFAbud)](https://discord.gg/tAdPHFAbud)

> **🎯 Branch `smooth-zoom`** - Versão com **YOLO Smooth Tracking** + face tracking configurável!

Fork do [ViralCutter](https://github.com/RafaelGodoyEbert/ViralCutter) com **Smooth Face Tracking** - a câmera segue o rosto de forma suave e cinematográfica.

---

## ✨ Novidades v0.9 - Smooth Face Tracking

![Smooth Tracking](https://img.shields.io/badge/🎥-Smooth_Tracking-blueviolet?style=for-the-badge)

### 🎥 Tracking Suave Configurável
A suavidade do tracking agora pode ser ajustada no Gradio!

| Alpha | Efeito |
|-------|--------|
| 0.02 | Ultra Suave (câmera bem lenta) |
| 0.05 | Normal (padrão recomendado) |
| 0.10 | Rápido (acompanha mais de perto) |

### ⚙️ Configuração via Interface
- **"Advanced Face Settings"** no Gradio
- **Slider "Tracking Smoothness"** para ajustar alpha
- Aplica-se apenas ao modo YOLO

**Tecnologias:**
- 🔍 **YOLOv8** - Detecção e tracking de pessoas em tempo real
- 📊 **ByteTrack** - IDs persistentes para cada pessoa
- 📈 **EMA (Exponential Moving Average)** - Suavização configurável

### ⚡ Otimização T4 (WhisperX)
Transcrição otimizada para GPUs T4 do Colab/Kaggle (16GB VRAM):

| Configuração | Valor | Benefício |
|--------------|-------|-----------|
| `compute_type` | int8_float16 | 50% menos VRAM |
| `model` | large-v2 | Mais estável que v3 |
| `batch_size` | 8 | Evita OOM em vídeos longos |
| `language` | pt (padrão) | Pula detecção automática |
| `chunk_size` | 15 | Chunks maiores = mais eficiente |

---

## 🚀 Notebooks Disponíveis

### 🔵 Colab - Smooth Zoom
**Características:**
- ✅ YOLO Smooth Zoom **ATIVADO POR PADRÃO**
- ✅ Upload automático para Google Drive
- ✅ Otimizado para GPUs T4
- ✅ Instalação rápida (3-5 min)

**Como usar:**
1. Abra o notebook [ViralCutter-SmoothZoom.ipynb](https://colab.research.google.com/github/masterface77/ViralCutter/blob/smooth-zoom/ViralCutter-SmoothZoom.ipynb)
2. Execute a célula principal
3. Aguarde a instalação (inclui `ultralytics`)
4. Clique no link `gradio.live` gerado
5. Face Model já vem selecionado como **yolo** 🎯

### 🟠 Kaggle - Smooth Zoom
**Características:**
- ✅ 30h/semana de GPU grátis
- ✅ Upload OAuth para sua conta Drive
- ✅ YOLO Smooth Zoom incluído
- ✅ Suporte a cookies e datasets

---

## 📦 Configurando Datasets no Kaggle

O notebook do Kaggle requer algumas credenciais. Siga o guia completo:

### 1️⃣ client_secret.json (Obrigatório)
Credenciais OAuth do Google Cloud para upload no Drive.

**Passos:**
1. Acesse [Google Cloud Console](https://console.cloud.google.com/)
2. Crie um projeto ou use um existente
3. Vá em **APIs & Services** → **Credentials**
4. **Create Credentials** → **OAuth 2.0 Client ID**
5. Escolha **Desktop App**
6. Baixe o JSON
7. No Kaggle: **Add Data** → **Upload** → Faça upload
8. Nomeie o dataset como `client-secret-json`

### 2️⃣ cookie (Opcional)
Cookies para download de vídeos privados/restritos.

**Passos:**
1. Instale [Get cookies.txt LOCAL](https://chrome.google.com/webstore/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc)
2. Acesse www.kaggle.com (logado)
3. Clique na extensão → **Export**
4. Salve como `www.youtube.com_cookies.txt`
5. No Kaggle: **Add Data** → **Upload**
6. Nomeie o dataset como `cookie`

### 3️⃣ credenciais-google (Obrigatório)
API Key do Gemini para análise com IA.

**Passos:**
1. Acesse [Google AI Studio](https://makersuite.google.com/app/apikey)
2. **Create API Key**
3. Copie a chave
4. Crie arquivo `gemini_api.txt` com a chave
5. No Kaggle: **Add Data** → **Upload**
6. Nomeie o dataset como `credenciais-google`

### 4️⃣ google-drive-credentials (Opcional)
Token OAuth reutilizável (gerado na primeira execução).

**Como reutilizar:**
1. Execute o notebook uma vez
2. Após autenticação, baixe o arquivo `.json` gerado em `/kaggle/working/`
3. Crie dataset no Kaggle com este arquivo
4. Nomeie como `google-drive-credentials`

---

## ✨ Diferenças entre Colab e Kaggle

| Característica | Colab | Kaggle |
|----------------|-------|--------|
| GPU Grátis | ✅ 12h/dia | ✅ 30h/semana |
| Configuração | Mais simples | Requer datasets |
| Upload Drive | Nativo | OAuth manual |
| Zoom IA | ❌ Removido | ✅ Disponível |
| Persistência | ❌ Nenhuma | ✅ Datasets |

---

## 🎯 Recursos

- **Detecção automática** de momentos virais
- **Transcrição com IA** (WhisperX)
- **Corte inteligente** com análise semântica
- **Legendas automáticas**
- **Processamento em batch**

---

## 🔗 Links Úteis

- **Licença (GPL v3):** [LICENSE](LICENSE)
- **Repositório Original:** [RafaelGodoyEbert/ViralCutter](https://github.com/RafaelGodoyEbert/ViralCutter)
- **Discord (Suporte):** [discord.gg/tAdPHFAbud](https://discord.gg/tAdPHFAbud)

---

## 📝 Créditos

Desenvolvido por **Rafa.Godoy**
- [GitHub](https://github.com/rafaelGodoyEbert)
- [Twitter](https://twitter.com/GodoyEbert)
- [Instagram](https://www.instagram.com/rafael.godoy.ebert/)

Fork customizado para facilitar uso em Kaggle e Colab.

---

## 📄 Licença

Este projeto é licenciado sob a **GNU General Public License v3**, permitindo que você copie, distribua e modifique o software livremente, desde que mantenha a mesma licença. [Leia a licença completa aqui](LICENSE).

<a id="viralcutter-original"></a>
# ViralCutter
[![Discord](https://dcbadge.limes.pink/api/server/tAdPHFAbud)](https://discord.gg/tAdPHFAbud)<br>

Expand Down
4 changes: 4 additions & 0 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,9 @@ ViralCutter is community-maintained. Join us to democratize AI content creation!
- **Discord**: [AI Hub Brasil](https://discord.gg/aihubbrasil)
- **Github**: Give us a ⭐ star if this project helped you!

## 📄 License

This project is licensed under the **GNU General Public License v3**. [Read the full license here](LICENSE).

**Current Version**: 0.8v Alpha
*ViralCutter: Because viral clips shouldn't cost a fortune.* 🚀
Loading