We (/w Ritwik Raha) have covered SigLIP in depth in our blog Choosing Between SigLIP and CLIP for Language Image Pretraining.
PaliGemma is a new family of vision-language models from Google. These models can process both images and text to produce text outputs.
Google has released three types of PaliGemma models:
Each type comes in different resolutions and multiple precisions for convenience. All models are available on the Hugging Face Hub with model cards, licenses, and integration with transformers.
In the script provided we have used the tuxemon
dataset, from the diffusers team. The dataset comprises of images of tuxemons (a spin off of pokemons)
and their captions.
Before Fine Tuning | After Fine Tuning |
---|---|
While I could not find a document that provides pointers to train the model on a detection dataset, diving in the official big vision space made it really clear. Taking inspiration from the space, I have create a script to format any object detection dataset (here the dataset is based on the coco format) to the format PaliGemma is trained on.
You can find the dataset creation script here: create_od_dataset.py
.
After the dataset is created run the fine tuning script object_detection_ft.py
and run the model.
Before Fine Tuning | After Fine Tuning |
---|---|
If you want to read more about PaliGemma and SigLip we have written two blogposts on the topic:
If you like our work and would use it please cite us! ^_^
@misc{github_repository,
author = {Aritra Roy Gosthipaty, Ritwik Raha},
title = {ft-pali-gemma},
publisher = {{GitHub}(https://github.com)},
howpublished = {\url{https://github.com/ariG23498/ft-pali-gemma/edit/main/README.md}},
year = {2024}
}