This week, significant changes were made to FaceCraft, focusing primarily on improving the language translation capabilities. Previously, the project utilized a single multilingual model, "Helsinki-NLP/opus-mt-mul-en", from MarianMT for translating various languages to English. While functional, this approach had limitations in terms of translation accuracy and specificity. To address these issues and enhance the precision of language translation, i transitioned from using the multilingual model to deploying individual language-specific models for each major language—French, Spanish, German, Japanese, Chinese, and Portuguese. Each language now has a dedicated translation model, such as "Helsinki-NLP/opus-mt-fr-en" for French to English, ensuring more nuanced and accurate translations. This change allows for greater control over linguistic nuances, which is crucial for generating precise image descriptions that our AI uses to create images.
Moreover, i introduced a language detection mechanism that can identify the language used in the text description input by the user. This feature enables the system to automatically select the appropriate translation model based on the detected language, streamlining the process and enhancing user experience.
A significant advancement this week is the capability to handle multilingual prompts within a single input. Our system can now effectively manage descriptions containing multiple languages, translating them seamlessly into English for consistent processing. This was achieved by integrating the langdetect library, which detects and segments different languages within the text, allowing the corresponding translation models to work in tandem.
Comments