imgboost-ai 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. imgboost_ai-0.1.0/.gitignore +74 -0
  2. imgboost_ai-0.1.0/1.png +0 -0
  3. imgboost_ai-0.1.0/CHANGELOG.md +100 -0
  4. imgboost_ai-0.1.0/CONTRIBUTING.md +261 -0
  5. imgboost_ai-0.1.0/LICENSE +21 -0
  6. imgboost_ai-0.1.0/MANIFEST.in +4 -0
  7. imgboost_ai-0.1.0/PKG-INFO +387 -0
  8. imgboost_ai-0.1.0/PROJECT_STRUCTURE.md +153 -0
  9. imgboost_ai-0.1.0/QUICKSTART.md +126 -0
  10. imgboost_ai-0.1.0/README.md +343 -0
  11. imgboost_ai-0.1.0/README_PYPI.md +51 -0
  12. imgboost_ai-0.1.0/examples.py +124 -0
  13. imgboost_ai-0.1.0/imgboost/__init__.py +10 -0
  14. imgboost_ai-0.1.0/imgboost/cli.py +169 -0
  15. imgboost_ai-0.1.0/imgboost/core.py +162 -0
  16. imgboost_ai-0.1.0/imgboost/processors/__init__.py +9 -0
  17. imgboost_ai-0.1.0/imgboost/processors/document.py +269 -0
  18. imgboost_ai-0.1.0/imgboost/processors/filters.py +257 -0
  19. imgboost_ai-0.1.0/imgboost/processors/superres.py +252 -0
  20. imgboost_ai-0.1.0/imgboost/utils/__init__.py +7 -0
  21. imgboost_ai-0.1.0/imgboost/utils/image_io.py +231 -0
  22. imgboost_ai-0.1.0/imgboost_ai.egg-info/PKG-INFO +387 -0
  23. imgboost_ai-0.1.0/imgboost_ai.egg-info/SOURCES.txt +36 -0
  24. imgboost_ai-0.1.0/imgboost_ai.egg-info/dependency_links.txt +1 -0
  25. imgboost_ai-0.1.0/imgboost_ai.egg-info/entry_points.txt +2 -0
  26. imgboost_ai-0.1.0/imgboost_ai.egg-info/requires.txt +13 -0
  27. imgboost_ai-0.1.0/imgboost_ai.egg-info/top_level.txt +1 -0
  28. imgboost_ai-0.1.0/install.sh +70 -0
  29. imgboost_ai-0.1.0/mnt/user-data/outputs/imgboost/imgboost/processors/__init__.py +9 -0
  30. imgboost_ai-0.1.0/mnt/user-data/outputs/imgboost/imgboost/utils/__init__.py +7 -0
  31. imgboost_ai-0.1.0/publish.ps1 +34 -0
  32. imgboost_ai-0.1.0/publish.sh +36 -0
  33. imgboost_ai-0.1.0/pyproject.toml +59 -0
  34. imgboost_ai-0.1.0/requirements.txt +8 -0
  35. imgboost_ai-0.1.0/setup.cfg +4 -0
  36. imgboost_ai-0.1.0/setup.py +36 -0
  37. imgboost_ai-0.1.0/test_enhance_text.py +28 -0
  38. imgboost_ai-0.1.0/test_imgboost.py +199 -0
@@ -0,0 +1,74 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ pip-wheel-metadata/
20
+ share/python-wheels/
21
+ *.egg-info/
22
+ .installed.cfg
23
+ *.egg
24
+ MANIFEST
25
+
26
+ # Virtual Environment
27
+ venv/
28
+ ENV/
29
+ env/
30
+ .venv
31
+
32
+ # IDEs
33
+ .vscode/
34
+ .idea/
35
+ *.swp
36
+ *.swo
37
+ *~
38
+ .DS_Store
39
+
40
+ # Testing
41
+ .pytest_cache/
42
+ .coverage
43
+ htmlcov/
44
+ *.cover
45
+ .hypothesis/
46
+
47
+ # Output and temporary files
48
+ output/
49
+ *.log
50
+ temp/
51
+ tmp/
52
+
53
+ # Jupyter Notebooks
54
+ .ipynb_checkpoints
55
+
56
+ # Distribution / packaging
57
+ *.whl
58
+
59
+ # mypy
60
+ .mypy_cache/
61
+ .dmypy.json
62
+ dmypy.json
63
+
64
+ # Pyre
65
+ .pyre/
66
+
67
+ # Backup files
68
+ *.bak
69
+ *.backup
70
+ *~
71
+
72
+ # OS files
73
+ Thumbs.db
74
+ .DS_Store
Binary file
@@ -0,0 +1,100 @@
1
+ # Changelog
2
+
3
+ Todas as mudanças notáveis neste projeto serão documentadas neste arquivo.
4
+
5
+ O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/),
6
+ e este projeto adere ao [Semantic Versioning](https://semver.org/lang/pt-BR/).
7
+
8
+ ## [0.1.0] - 2026-02-06
9
+
10
+ ### Adicionado
11
+ - ✨ Interface CLI completa usando Click
12
+ - 🎯 4 modos de processamento especializados:
13
+ - `general`: Melhoria geral balanceada
14
+ - `text`: Otimizado para documentos e OCR
15
+ - `dark`: Otimizado para interfaces escuras
16
+ - `superres`: Super-resolução com upscaling
17
+ - 🔧 Filtros de processamento de imagem:
18
+ - Denoise com Fast Non-Local Means
19
+ - CLAHE para contraste adaptativo
20
+ - Sharpening profissional
21
+ - Unsharp mask
22
+ - Ajuste de gamma
23
+ - Balanço de branco automático
24
+ - 📄 Processador especializado para documentos:
25
+ - Binarização adaptativa
26
+ - Deskew (correção de inclinação)
27
+ - Remoção de sombras
28
+ - Detecção de regiões de texto
29
+ - Pipeline completo para OCR
30
+ - 🚀 Super-resolução:
31
+ - Upscaling com LANCZOS4
32
+ - Multi-scale enhancement
33
+ - Realce de texturas
34
+ - Suporte para modelos de IA (futuro)
35
+ - ⚡ Processamento em lote:
36
+ - Comando `batch` com paralelização
37
+ - Barra de progresso com tqdm
38
+ - Suporte a múltiplos workers
39
+ - 💾 Suporte a múltiplos formatos:
40
+ - JPEG, PNG, BMP, TIFF, WebP
41
+ - Conversão automática entre formatos
42
+ - Ajuste de qualidade por formato
43
+ - 📊 Comando `info` para verificar sistema
44
+ - 🧪 Suite de testes completa
45
+ - 📖 Documentação extensiva:
46
+ - README.md completo
47
+ - QUICKSTART.md para início rápido
48
+ - Exemplos de código
49
+ - Comentários inline
50
+ - 🛠️ Scripts auxiliares:
51
+ - `install.sh` para instalação rápida
52
+ - `examples.py` com exemplos práticos
53
+ - `test_imgboost.py` para testes
54
+
55
+ ### Características técnicas
56
+ - Arquitetura modular e extensível
57
+ - Processadores independentes e reutilizáveis
58
+ - Pipeline configurável por parâmetros
59
+ - Tratamento robusto de erros
60
+ - Logging e modo verbose
61
+ - Validação de entrada
62
+ - Preservação de metadados (quando possível)
63
+
64
+ ### Dependências
65
+ - Python >= 3.8
66
+ - OpenCV >= 4.8.0
67
+ - NumPy >= 1.24.0
68
+ - Click >= 8.1.0
69
+ - scikit-image >= 0.21.0
70
+ - tqdm >= 4.66.0
71
+ - PyTorch >= 2.0.0 (opcional)
72
+
73
+ ## [Futuro] - Planejado
74
+
75
+ ### A implementar
76
+ - [ ] Integração completa com Real-ESRGAN
77
+ - [ ] Download automático de modelos
78
+ - [ ] Suporte a processamento de vídeo
79
+ - [ ] Processamento de PDFs multipáginas
80
+ - [ ] Interface web com Flask/FastAPI
81
+ - [ ] Presets customizáveis salvos
82
+ - [ ] Processamento com GPU (CUDA)
83
+ - [ ] Comparação lado a lado de resultados
84
+ - [ ] Estatísticas de melhoria (PSNR, SSIM)
85
+ - [ ] Plugin para Photoshop/GIMP
86
+ - [ ] API REST para integração
87
+ - [ ] Docker container
88
+ - [ ] Testes unitários com pytest
89
+ - [ ] CI/CD com GitHub Actions
90
+ - [ ] Publicação no PyPI
91
+
92
+ ---
93
+
94
+ **Legenda:**
95
+ - ✨ Novo recurso
96
+ - 🔧 Melhoria
97
+ - 🐛 Correção de bug
98
+ - 📖 Documentação
99
+ - 🚀 Performance
100
+ - ⚡ Funcionalidade
@@ -0,0 +1,261 @@
1
+ # Contribuindo para o ImgBoost 🤝
2
+
3
+ Obrigado por considerar contribuir com o ImgBoost!
4
+
5
+ ## Como Contribuir
6
+
7
+ ### 🐛 Reportar Bugs
8
+
9
+ Se encontrou um bug, abra uma issue com:
10
+ - Descrição clara do problema
11
+ - Passos para reproduzir
12
+ - Comportamento esperado vs atual
13
+ - Screenshots (se aplicável)
14
+ - Informações do sistema (`imgboost info`)
15
+
16
+ ### ✨ Sugerir Funcionalidades
17
+
18
+ Para sugerir novas funcionalidades:
19
+ - Abra uma issue com tag "enhancement"
20
+ - Descreva o caso de uso
21
+ - Explique por que seria útil
22
+ - Dê exemplos de uso
23
+
24
+ ### 🔧 Pull Requests
25
+
26
+ 1. **Fork o projeto**
27
+ ```bash
28
+ git clone https://github.com/yourusername/imgboost.git
29
+ cd imgboost
30
+ ```
31
+
32
+ 2. **Crie uma branch**
33
+ ```bash
34
+ git checkout -b feature/minha-funcionalidade
35
+ # ou
36
+ git checkout -b fix/meu-bugfix
37
+ ```
38
+
39
+ 3. **Faça suas alterações**
40
+ - Siga o estilo de código existente
41
+ - Adicione testes se aplicável
42
+ - Atualize a documentação
43
+ - Adicione comentários quando necessário
44
+
45
+ 4. **Teste suas mudanças**
46
+ ```bash
47
+ python test_imgboost.py
48
+ ```
49
+
50
+ 5. **Commit suas mudanças**
51
+ ```bash
52
+ git add .
53
+ git commit -m "feat: adiciona funcionalidade X"
54
+ # ou
55
+ git commit -m "fix: corrige bug Y"
56
+ ```
57
+
58
+ **Padrão de commits:**
59
+ - `feat:` nova funcionalidade
60
+ - `fix:` correção de bug
61
+ - `docs:` documentação
62
+ - `style:` formatação
63
+ - `refactor:` refatoração
64
+ - `test:` testes
65
+ - `chore:` tarefas gerais
66
+
67
+ 6. **Push para o GitHub**
68
+ ```bash
69
+ git push origin feature/minha-funcionalidade
70
+ ```
71
+
72
+ 7. **Abra um Pull Request**
73
+ - Descreva suas mudanças
74
+ - Referencie issues relacionadas
75
+ - Aguarde review
76
+
77
+ ## Estrutura do Código
78
+
79
+ ```
80
+ imgboost/
81
+ ├── imgboost/
82
+ │ ├── cli.py # Interface de linha de comando
83
+ │ ├── core.py # Engine principal
84
+ │ ├── processors/ # Algoritmos de processamento
85
+ │ │ ├── filters.py # Filtros gerais
86
+ │ │ ├── document.py # Processamento de docs
87
+ │ │ └── superres.py # Super-resolução
88
+ │ └── utils/
89
+ │ └── image_io.py # I/O de imagens
90
+ ```
91
+
92
+ ## Guia de Estilo
93
+
94
+ ### Python
95
+ - Siga PEP 8
96
+ - Use type hints quando possível
97
+ - Docstrings em português
98
+ - Máximo 100 caracteres por linha
99
+ - 4 espaços de indentação
100
+
101
+ **Exemplo:**
102
+ ```python
103
+ def process_image(img: np.ndarray, strength: int = 10) -> np.ndarray:
104
+ """
105
+ Processa a imagem aplicando denoise.
106
+
107
+ Args:
108
+ img: Imagem BGR
109
+ strength: Força do denoise (0-30)
110
+
111
+ Returns:
112
+ Imagem processada
113
+ """
114
+ # Código aqui
115
+ pass
116
+ ```
117
+
118
+ ### Commits
119
+ - Use mensagens descritivas
120
+ - Primeira linha com no máximo 72 caracteres
121
+ - Use verbos no imperativo ("adiciona", não "adicionado")
122
+ - Referencie issues quando aplicável
123
+
124
+ **Exemplos bons:**
125
+ ```
126
+ feat: adiciona suporte a processamento de PDF
127
+ fix: corrige erro ao carregar PNG com transparência
128
+ docs: atualiza README com novos exemplos
129
+ ```
130
+
131
+ **Exemplos ruins:**
132
+ ```
133
+ atualização
134
+ fix bug
135
+ mudanças várias
136
+ ```
137
+
138
+ ## Adicionando Novos Processadores
139
+
140
+ Para adicionar um novo processador:
141
+
142
+ 1. **Crie o arquivo em `imgboost/processors/`**
143
+ ```python
144
+ # novo_processador.py
145
+ class NovoProcessador:
146
+ def __init__(self):
147
+ pass
148
+
149
+ def processar(self, img):
150
+ # Sua lógica aqui
151
+ return img
152
+ ```
153
+
154
+ 2. **Importe em `__init__.py`**
155
+ ```python
156
+ from .novo_processador import NovoProcessador
157
+
158
+ __all__ = [..., 'NovoProcessador']
159
+ ```
160
+
161
+ 3. **Use no `core.py`**
162
+ ```python
163
+ from .processors import NovoProcessador
164
+
165
+ self.novo = NovoProcessador()
166
+ ```
167
+
168
+ 4. **Adicione testes**
169
+ ```python
170
+ def test_novo_processador():
171
+ proc = NovoProcessador()
172
+ img = create_test_image()
173
+ result = proc.processar(img)
174
+ assert result is not None
175
+ ```
176
+
177
+ 5. **Documente**
178
+ - Atualize o README
179
+ - Adicione exemplo
180
+ - Atualize CHANGELOG
181
+
182
+ ## Adicionando Novos Modos
183
+
184
+ Para adicionar um novo modo de processamento:
185
+
186
+ 1. **Adicione a opção no CLI** (`cli.py`)
187
+ ```python
188
+ @click.option('--mode', '-m',
189
+ type=click.Choice(['general', 'text', 'dark', 'novo'], ...)
190
+ ```
191
+
192
+ 2. **Implemente no Engine** (`core.py`)
193
+ ```python
194
+ def _process_novo(self, img):
195
+ """Pipeline do novo modo."""
196
+ # Sua lógica
197
+ return img
198
+ ```
199
+
200
+ 3. **Adicione ao switch de modos**
201
+ ```python
202
+ elif mode == 'novo':
203
+ img = self._process_novo(img)
204
+ ```
205
+
206
+ ## Testes
207
+
208
+ Execute os testes antes de fazer PR:
209
+
210
+ ```bash
211
+ # Testes básicos
212
+ python test_imgboost.py
213
+
214
+ # Teste manual
215
+ imgboost process test_image.jpg --mode general -v
216
+
217
+ # Teste de lote
218
+ imgboost batch test_images/ --workers 4
219
+ ```
220
+
221
+ ## Documentação
222
+
223
+ Ao adicionar funcionalidades, atualize:
224
+ - [ ] README.md (se for feature visível)
225
+ - [ ] QUICKSTART.md (se for uso básico)
226
+ - [ ] Docstrings no código
227
+ - [ ] CHANGELOG.md
228
+ - [ ] Exemplos em `examples.py`
229
+
230
+ ## Checklist do PR
231
+
232
+ Antes de submeter seu PR, verifique:
233
+
234
+ - [ ] Código segue o guia de estilo
235
+ - [ ] Testes passam
236
+ - [ ] Documentação atualizada
237
+ - [ ] CHANGELOG atualizado
238
+ - [ ] Commit messages descritivos
239
+ - [ ] Sem arquivos desnecessários
240
+ - [ ] Branch está atualizada com main
241
+
242
+ ## Dúvidas?
243
+
244
+ - 💬 Abra uma issue para discussão
245
+ - 📧 Entre em contato via email (se disponível)
246
+ - 🐛 Reporte bugs através de issues
247
+
248
+ ## Código de Conduta
249
+
250
+ - Seja respeitoso e profissional
251
+ - Aceite críticas construtivas
252
+ - Foque no que é melhor para o projeto
253
+ - Mostre empatia com outros contribuidores
254
+
255
+ ## Licença
256
+
257
+ Ao contribuir, você concorda que suas contribuições serão licenciadas sob a licença MIT.
258
+
259
+ ---
260
+
261
+ **Obrigado por contribuir! 🎉**
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ImgBoost Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ recursive-include imgboost *.py