{"id":15783752,"url":"https://github.com/deepmancer/unet-semantic-segmentation","last_synced_at":"2026-02-12T03:54:11.085Z","repository":{"id":163644355,"uuid":"639110016","full_name":"deepmancer/unet-semantic-segmentation","owner":"deepmancer","description":" PyTorch UNet model for semantic segmentation of urban scenes using the Cityscapes dataset","archived":false,"fork":false,"pushed_at":"2024-08-16T13:05:10.000Z","size":2637,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-11T20:04:30.104Z","etag":null,"topics":["cityscapes","from-scratch","image-segmentation","semantic-segmentation","unet","unet-image-segmentation","unet-pytorch"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/deepmancer.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}},"created_at":"2023-05-10T19:30:11.000Z","updated_at":"2024-08-24T23:13:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"0f719aa0-ff13-4f02-a8f9-3705439a1997","html_url":"https://github.com/deepmancer/unet-semantic-segmentation","commit_stats":null,"previous_names":["alirezaheidari-cs/semantic-segmentation","deepmancer/semantic-segmentation","deepmancer/unet-semantic-segmentation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deepmancer/unet-semantic-segmentation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Funet-semantic-segmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Funet-semantic-segmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Funet-semantic-segmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Funet-semantic-segmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepmancer","download_url":"https://codeload.github.com/deepmancer/unet-semantic-segmentation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Funet-semantic-segmentation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274158838,"owners_count":25232630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cityscapes","from-scratch","image-segmentation","semantic-segmentation","unet","unet-image-segmentation","unet-pytorch"],"created_at":"2024-10-04T20:01:03.931Z","updated_at":"2026-02-12T03:54:05.989Z","avatar_url":"https://github.com/deepmancer.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏙️ UNet for Semantic Segmentation of Urban Scenes\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/PyTorch-EE4C2C.svg?style=for-the-badge\u0026logo=PyTorch\u0026logoColor=white\" alt=\"PyTorch\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Python-3.6+-3776AB.svg?style=for-the-badge\u0026logo=Python\u0026logoColor=white\" alt=\"Python\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Cityscapes-Dataset-009688.svg?style=for-the-badge\u0026logo=Cityscapes\u0026logoColor=white\" alt=\"Cityscapes\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Jupyter-F37626.svg?\u0026style=for-the-badge\u0026logo=Jupyter\u0026logoColor=white\" alt=\"Jupyter Notebook\"\u003e\n\n\u003c/p\u003e\n\n### About\n\nThis project implements a UNet model for performing high-precision semantic segmentation on urban road scenes captured by self-driving car cameras.\n\n---\n\n## 📝 Project Description\n\nSemantic segmentation is a critical task in computer vision, particularly in the context of autonomous driving. This project focuses on developing a UNet-based model capable of accurately identifying and classifying each pixel in a road scene image. The goal is to segment various elements such as roads, cars, pedestrians, and buildings, contributing to a machine's understanding of its environment.\n\n### 🎯 Objectives\n\n- **Model**: Implement a UNet architecture for semantic segmentation.\n- **Task**: Classify each pixel in high-resolution images into one of 19 object classes.\n- **Application**: Enhance the safety and navigation of self-driving cars through precise environmental perception.\n\n---\n\n## 🛠️ Prerequisites\n\nEnsure that you have the following dependencies installed before running the project:\n\n- **Python 3.6+**: The programming language used for the project.\n- **PyTorch**: The deep learning framework employed for building and training the UNet model.\n- **Pandas**: For data manipulation and analysis.\n- **NumPy**: For numerical operations, particularly with arrays and matrices.\n\nYou can install the required libraries via pip:\n\n```bash\npip install torch pandas numpy\n```\n\n---\n\n## 🌆 Dataset: Cityscapes\n\nThe **Cityscapes Dataset** is a large-scale benchmark dataset used for training and evaluating models for semantic urban scene understanding. \n\n### Dataset Overview\n\n- **Total Images**: 5,000 high-resolution images\n- **Resolution**: 2048x1024 pixels per image\n- **Classes**: 19 object classes, including roads, cars, pedestrians, buildings, and more\n- **Annotations**: High-quality pixel-level annotations\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://production-media.paperswithcode.com/datasets/Cityscapes-0000003437-d7b741b4.jpg\" alt=\"Cityscapes Sample Image\" width=\"600\"\u003e\n\u003c/p\u003e\n\n---\n\n## ⚙️ Model Architecture: UNet\n\nUNet is a powerful convolutional network designed for semantic segmentation tasks. It excels at accurately segmenting images, even when the training data is limited. The architecture is characterized by its encoder-decoder structure:\n\n- **Encoder**: Captures the context of the input image through a series of convolutional and max-pooling layers.\n- **Decoder**: Reconstructs the spatial resolution using up-convolutional layers, allowing the model to predict the segmentation mask for each pixel.\n\n### Training\n\n- **Optimization**: The model is trained using the Cityscapes dataset, focusing on learning the complex urban scene structures.\n- **Loss Function**: A combination of cross-entropy loss and dice loss is used to optimize pixel-wise predictions.\n- **Evaluation**: The model's performance is evaluated using metrics such as Intersection over Union (IoU) and pixel accuracy.\n\n---\n\n## 🖼️ Results\n\nThe UNet model delivers high-quality segmentation outputs, distinguishing between various elements of urban scenes with remarkable precision.\n\n\u003cp align=\"left\"\u003e\n  \u003cimg src=\"Images/unet_out.png\" width=\"1000\" alt=\"UNet Segmentation Output\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepmancer%2Funet-semantic-segmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepmancer%2Funet-semantic-segmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepmancer%2Funet-semantic-segmentation/lists"}