Este projeto tem como objetivo resolver um grande problema que tenho há muito tempo - digitalizar meus materiais e notas de forma simples e rápida.
Com o auxílio da API do Google Gemini, eu consegui criar um sistema que ataca exatamente este problema.
Eu, minha mãe, minha avó, todos já nos encontramos na situação de querer salvar algum material escrito à mão de forma digital, seja para ter mais formalidade ou até mesmo para ter como alterá-lo de forma mais simples posteriormente, mas nunca tivemos acesso à ferramenta correta.
Para isso, criei o ProjetoNotas. O projeto em que utilizamos o potente modelo Gemini da Google para criar de forma automática e dinâmica materiais digitalizados de nossas mídias físicas!
- Extrai texto de imagens de cadernos
- Converte equações LaTeX em imagens de alta qualidade (em desenvolvimento)
- Gera PDFs formatados
- Python 3.6 ou superior
- Bibliotecas Python:
- google.generativeai
- sys
- os
- FPDF
- Pillow (PIL)
- matplotlib
- python-dotenv
- Clone o Repositório:
git clone https://github.com/Cerne17/ProjetoNotas.git - Instale as dependências:
pip install -r requirements.txt
- Tire fotos das notas a serem digitalizadas.
- Coloque todas as fotos, organizando-as por ordem numérica, dentro da pasta
imagensdo projeto - Inclua sua chave da Google API
- Note que disponibilizamos um exemplo de como seu arquivo
.envdeve ser para que o código funcione - Mas outra forma de se fazer seria substituir o valor da variável
GOOGLE_API_KEYdiretamente no arquivomain.py
- Note que disponibilizamos um exemplo de como seu arquivo
- Execute o script principal:
python main.pyoupython3 main.py - Note que todos arquivos devem ter mesmo tamanho de nome para a ordenação funcionar como esperado. Ou seja:
- Se precisar do pdf de
1432páginas, todos arquivos devem ter nome com4dígitos:0001.png,0012.png,0123.jpg, ... - Se precisar do pdf de
14páginas, todos arquivos devem ter nome com2dígitos:01.png,09.png,12.jpg, ... - E assim por diante.
- Se precisar do pdf de
Sinta-se livre para mudar as configurações de fonte, tamanho da escrita, linhas por página.
Essas configurações encontram-se no método __init__ da classe CriadorDePdf, no arquivo CriadorDePdf.py.
This project aims to solve a major problem I've had for a long time - digitizing my materials and notes simply and quickly.
With the help of the Google Gemini API, I managed to create a system that addresses exactly this problem.
Me, my mother, my grandmother, we have all found ourselves in the situation of wanting to save some handwritten material digitally, whether to have more formality or even to be able to change it more simply later, but we never had access to the correct tool.
For this, I created ProjetoNotas (NotesProject). A project where we use Google's powerful Gemini model to automatically and dynamically create digitized materials from our physical media!
- Extracts text from notebook images
- Converts LaTeX equations into high-quality images (in development)
- Generates formatted PDFs
- Python 3.6 or higher
- Python Libraries:
- google.generativeai
- sys
- os
- FPDF
- Pillow (PIL)
- matplotlib
- python-dotenv
- Clone the Repository:
git clone https://github.com/Cerne17/ProjetoNotas.git - Install dependencies:
pip install -r requirements.txt
- Take photos of the notes to be digitized.
- Place all photos, organized by numerical order, inside the
imagensfolder of the project. - Include your Google API Key:
- Note that we provide an example of how your
.envfile should be for the code to work. - Another way would be to replace the
GOOGLE_API_KEYvariable value directly in themain.pyfile.
- Note that we provide an example of how your
- Run the main script:
python main.pyorpython3 main.py - Note that all files must have the same name length for sorting to work as expected. That is:
- If you need a pdf of
1432pages, all files must have a name with4digits:0001.png,0012.png,0123.jpg, ... - If you need a pdf of
14pages, all files must have a name with2digits:01.png,09.png,12.jpg, ... - And so on.
- If you need a pdf of
Feel free to change font settings, writing size, lines per page.
These settings are found in the __init__ method of the CriadorDePdf class, in the CriadorDePdf.py file.