An open API service indexing awesome lists of open source software.

https://github.com/capjamesg/image-collage

Generate an image collage with computer vision.
https://github.com/capjamesg/image-collage

art computer-vision python zero-shot-object-detection

Last synced: 11 months ago
JSON representation

Generate an image collage with computer vision.

Awesome Lists containing this project

README

          

# Image Collage Generator

Generate a collage of images where a specific object of interest is focused.

This project uses a zero-shot object detection model, Grounding DINO, to identify regions corresponding to objects of interest. These regions are then cropped and stitched together into a collage.

Here is an example of a collage generated by this project:

![grid](https://github.com/capjamesg/image-collage/assets/37276661/f4d527a0-6150-4213-9220-d4190f1767a8)

## Usage

First, install this project from source:

```
git clone https://github.com/capjamesg/image-collage
cd image-collage
pip3 install -r requirements.txt
```

To generate a collage, run:

```
python3 app.py --input_images=folder/with/images --prompt="object" --confidence=0.7
```

Above, set:

- `input_images` to the name of a directory with all the images you want to stich together into a collage.
- `prompt` to the object of interest you want to identify.
- `confidence` to the minimum confidence a model prediction must be to be considered for inclusion in the image collage.

## License

This project is licensed under an [MIT license](LICENSE).