{"id":22624474,"url":"https://github.com/stifler7/text-to-image-generation","last_synced_at":"2026-05-16T01:33:28.862Z","repository":{"id":266941487,"uuid":"899824598","full_name":"STiFLeR7/Text-to-Image-Generation","owner":"STiFLeR7","description":"To build a system that generates realistic images from textual descriptions using pretrained models like Stable Diffusion, DALL-E, or similar architectures. The system leverages pretrained transformer-based models for both text and image understanding and generation.","archived":false,"fork":false,"pushed_at":"2025-01-08T16:43:13.000Z","size":87182,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-03T08:39:26.751Z","etag":null,"topics":["cv2","gans","generative-ai","tensorflow","torch","torchvision"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/STiFLeR7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-07T05:35:36.000Z","updated_at":"2025-03-19T15:47:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"c155d935-aba6-4e60-a69c-54cd8e3ffd5b","html_url":"https://github.com/STiFLeR7/Text-to-Image-Generation","commit_stats":null,"previous_names":["stifler7/text-to-image-generation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/STiFLeR7/Text-to-Image-Generation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STiFLeR7%2FText-to-Image-Generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STiFLeR7%2FText-to-Image-Generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STiFLeR7%2FText-to-Image-Generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STiFLeR7%2FText-to-Image-Generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/STiFLeR7","download_url":"https://codeload.github.com/STiFLeR7/Text-to-Image-Generation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/STiFLeR7%2FText-to-Image-Generation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33087028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cv2","gans","generative-ai","tensorflow","torch","torchvision"],"created_at":"2024-12-09T00:15:34.421Z","updated_at":"2026-05-16T01:33:28.848Z","avatar_url":"https://github.com/STiFLeR7.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# **Text-to-Image Generation with Stable Diffusion and ESRGAN**\n\nThis project implements a Text-to-Image generation pipeline using Stable Diffusion and Real-ESRGAN for high-resolution image enhancement. The pipeline generates images based on descriptive text prompts and then enhances the resolution using ESRGAN. The generated images are evaluated using Inception Score (IS) to assess the quality and diversity of the output.\n\n\n## **Key Features**\n**Text-to-Image Generation**: Generates images based on text prompts using Stable Diffusion.\n\n**Resolution Enhancement**: Enhances the resolution of generated images using Real-ESRGAN.\n\n**Multiple Prompt Support**: Handles diverse prompts such as \"A futuristic city skyline\" and \"A cat wearing a spacesuit\".\n\n**Inception Score (IS)**: Evaluates the quality and diversity of the generated images using the Inception Score metric.\n## **Technologies Used**\n\n**Stable Diffusion**: A powerful text-to-image generation model that generates realistic images from text descriptions.\n\n**Real-ESRGAN**: A state-of-the-art image upscaling model that enhances the resolution of images while preserving quality.\n\n**TensorFlow**: Used for the InceptionV3 model to compute the Inception Score (IS), which measures the quality of generated images.\n\n**Matplotlib**: Used to display generated images inline for visual inspection.\n## **Setup and Installation**\n\n1. Install Dependencies\n\n    You need to install the necessary libraries and dependencies for this project.\n\n```bash\npip install torch torchvision\npip install diffusers\npip install realesrgan\npip install tensorflow\npip install matplotlib\npip install pytorch-fid\n```\n\n2. Clone the Repository\n\n    Clone the repository to get started with the project:\n\n```bash\ngit clone https://github.com/STiFLeR7/text-to-image-generation.git\ncd text-to-image-generation\n```\n\n\n\n## **Usage**\n\n1. **Generate Images from Text Prompts**\n\n    To generate images, run the ```text_to_image.py``` script. It will generate images based on a list of predefined prompts and enhance their resolution using Real-ESRGAN.\n\n```python text_to_image.py```\n\nThe script will:\n\nGenerate images for multiple diverse prompts.\n\nEnhance the generated images using Real-ESRGAN.\n\nSave the generated images with filenames based on the prompt.\n\nDisplay the images using Matplotlib for visual inspection.\n\n2. **Evaluate Image Quality Using Inception Score (IS)**\n\n    The Inception Score (IS) is calculated for each generated image to evaluate its quality and diversity. The ```inception_score``` function uses the InceptionV3 model from TensorFlow.\n\n    To calculate the Inception Score for an image:\n    ```\n    from inception_score import inception_score\n\n    img_path = 'path_to_your_generated_image.png'\n    print(f\"Inception Score for the image: {inception_score(img_path)}\")\n    ```\n\n## **Project Flow**\n\n1. Text-to-Image Generation:\n\n    The script generates images from a list of prompts using Stable Diffusion.\n    The images are then passed through **Real-ESRGAN** for resolution  enhancement.\n    \n2. Saving and Displaying Images:\n\n    Generated images are saved with filenames based on the prompts.\n    Each image is displayed using **Matplotlib** for visual inspection.\n\n3. Image Evaluation:\n\n    The **Inception Score (IS)** is calculated for each image to measure its quality and diversity.\n## **Future Work**\n\n**Fine-Tuning**: Fine-tune the Stable Diffusion model on a specific dataset for improved results.\n\n**Improved Prompt Engineering**: Experiment with more sophisticated and creative prompts to get better and more diverse outputs.\n\n**Image Quality Enhancement**: Explore additional image enhancement techniques to further improve the resolution and clarity.\n\n**Additional Evaluation Metrics**: Implement more evaluation metrics like FID (Fréchet Inception Distance) for comparing generated images with real ones.\n## **Contributing**\n\nFeel free to fork the repository and contribute by submitting issues or pull requests. Your contributions to improving this project are welcome!\n\n\nLast updated on: 2024-12-18 11:46:00\nLast updated on: 2024-12-18 11:49:00","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstifler7%2Ftext-to-image-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstifler7%2Ftext-to-image-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstifler7%2Ftext-to-image-generation/lists"}