Instructions to use Seungjun/image_captioner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Seungjun/image_captioner with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="Seungjun/image_captioner")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Seungjun/image_captioner", dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,4 +11,13 @@ This model has been pushed to the Hub using the [PytorchModelHubMixin](https://h
|
|
| 11 |
- Docs: [More Information Needed]
|
| 12 |
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
- Docs: [More Information Needed]
|
| 12 |
|
| 13 |
|
| 14 |
+
## About the project
|
| 15 |
+
|
| 16 |
+
This is a decoder of image captioning model.
|
| 17 |
+
The image will be first preprocessed and resized to (224, 224) and then passed to ViT_b_32(with no classification layer), and then this will output
|
| 18 |
+
(N, 768). Then this will be repeated 32(max_length) times and will be passed to K, V to CrossMultiHeadAttention block in decoder. This model was trained with
|
| 19 |
+
Microsoft COCO2017 dataset and acheived 0.54 of masked_accuracy on validation set.
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
## Sample Code
|
| 23 |
+
To use this model, first you need to download ViT_b_32 which will be used as encoder and download decoder from this repo.
|