gitmyhub

Transformers-Tutorials

Jupyter Notebook ★ 12k updated 2mo ago

This repository contains demos I made with the Transformers library by HuggingFace.

A collection of hands-on Jupyter notebooks showing how to apply HuggingFace Transformers models for text, image classification, object detection, and document understanding, all runnable free in Google Colab.

PythonPyTorchJupyter NotebookHuggingFace TransformersGoogle Colabsetup: easycomplexity 3/5

This repository is a personal collection of tutorial notebooks created by a HuggingFace researcher using the Transformers library. The Transformers library, made by HuggingFace, provides pre-trained AI models for tasks like understanding text, classifying images, detecting objects in photos, and working with audio. These notebooks show how to use those models in practice.

Each notebook focuses on a specific model and a specific task. There are notebooks for recognizing named entities in text (identifying names of people, places, and organizations), classifying images into categories, detecting objects in photos, segmenting images into regions, estimating depth from a single photo, and reading text from scanned documents. Most notebooks run in Google Colab, a free browser-based tool that lets you run Python code without installing anything on your own computer.

The models covered span a wide range of modern AI approaches. For text tasks there is BERT and related models. For images there are Vision Transformer, DETR, and several object detection variants. For documents there are LayoutLM and Donut, which are designed to understand the layout and content of scanned pages or PDFs. Each notebook is self-contained: it loads a pre-trained model, prepares input data, runs the model, and shows the output.

This collection is aimed at people who already have some Python experience and want to see how to apply AI models to real problems without building those models from scratch. It is not a beginner-to-programming tutorial, but it does explain concepts as it goes. The author recommends the free HuggingFace course as background reading for anyone unfamiliar with these model types.

All notebooks are implemented in PyTorch. The full README is longer than what was shown.

Where it fits