# How to Train an Image Captioning Model for specific language

**URL:** <https://discuss.huggingface.co/t/how-to-train-an-image-captioning-model-for-specific-language/144578>\
**Category:** Beginners\
**Created:** [March 7, 2025, 8:14am UTC](https://discuss.huggingface.co/t/how-to-train-an-image-captioning-model-for-specific-language/144578 "2025-03-07T08:14:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![muhammadfhadli](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/muhammadfhadli/32/39543_2.png) [@muhammadfhadli](https://discuss.huggingface.co/u/muhammadfhadli)\
**Post date:** [March 7, 2025, 8:14am UTC](https://discuss.huggingface.co/t/how-to-train-an-image-captioning-model-for-specific-language/144578/1 "2025-03-07T08:14:57Z")

</div>

**Hi everyone,**

I want to train an image captioning model for my language. I already have images and captions in Indonesian, but I can only find pretrained models for other languages, especially English.

Is there a code template I can use for this task? I assume image captioning follows a common structure, so having a starting point would be really helpful.

Thank you!

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 7, 2025, 6:10pm UTC](https://discuss.huggingface.co/t/how-to-train-an-image-captioning-model-for-specific-language/144578/2 "2025-03-07T18:10:34Z")

</div>

If you have all that data, most of the work is done.

All that’s left is to do the work…  
I think the Course will be helpful for how to do it.  
There seem to be various ways to explore things like setting hyperparameters, from manual to automatic.

> **[Image captioning](https://huggingface.co/docs/transformers/main/en/tasks/image_captioning)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

> **[Welcome to the Community Computer Vision Course - Hugging Face Community...](https://huggingface.co/learn/computer-vision-course/en/unit0/welcome/welcome)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

and by Hugging Chat:

* * *

To train an image captioning model for Indonesian using the Hugging Face ecosystem, follow these organized steps:

1. **Data Preparation** :

2. **Model Selection** :

3. **Model Architecture Adjustment** :

4. **Tokenization Considerations** :

5. **Training and Fine-Tuning** :

6. **Computational Resources** :

7. **Research and Existing Models** :

8. **Evaluation and Iteration** :

By following these steps, you can effectively adapt an English pre-trained image captioning model to generate accurate Indonesian captions, leveraging the strengths of the Hugging Face ecosystem.

---

<div class="post-metadata">

**Author:** ![muhammadfhadli](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/muhammadfhadli/32/39543_2.png) [@muhammadfhadli](https://discuss.huggingface.co/u/muhammadfhadli)\
**Post date:** [March 8, 2025, 11:44pm UTC](https://discuss.huggingface.co/t/how-to-train-an-image-captioning-model-for-specific-language/144578/3 "2025-03-08T23:44:20Z")

</div>

thank you, this is very helpful.  
But i’m still wondering on step 3. how can i modify or fine-tune the text decoder to suit the Indonesian language. thankyou

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [March 9, 2025, 11:44am UTC](https://discuss.huggingface.co/t/how-to-train-an-image-captioning-model-for-specific-language/144578/4 "2025-03-09T11:44:44Z")

</div>

Closed on March 9, 2025, 11:44am UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
