{"id":24983937,"url":"https://github.com/nonezonyx/field_segmentation","last_synced_at":"2025-04-11T21:20:47.743Z","repository":{"id":275463468,"uuid":"926141538","full_name":"nonezonyx/field_segmentation","owner":"nonezonyx","description":"Determine which agricultural fields are currently cultivated with plants and which are resting until next growing season using deep learning segmentation models.","archived":false,"fork":false,"pushed_at":"2025-02-19T14:38:01.000Z","size":26899,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T17:16:17.773Z","etag":null,"topics":["fastapi","pyside6","python","semantic-segmentation","unet"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nonezonyx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-02-02T16:48:51.000Z","updated_at":"2025-02-19T16:00:21.000Z","dependencies_parsed_at":"2025-02-02T18:37:02.885Z","dependency_job_id":null,"html_url":"https://github.com/nonezonyx/field_segmentation","commit_stats":null,"previous_names":["nonezonyx/field_segmentation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonezonyx%2Ffield_segmentation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonezonyx%2Ffield_segmentation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonezonyx%2Ffield_segmentation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nonezonyx%2Ffield_segmentation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nonezonyx","download_url":"https://codeload.github.com/nonezonyx/field_segmentation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480421,"owners_count":21110939,"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","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":["fastapi","pyside6","python","semantic-segmentation","unet"],"created_at":"2025-02-04T09:40:44.100Z","updated_at":"2025-04-11T21:20:47.728Z","avatar_url":"https://github.com/nonezonyx.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Field Segmentation Project\n\nDetermine which agricultural fields are currently cultivated with plants and which are resting until next growing season using deep learning segmentation models.\n\n## Table of Contents\n- [Project Overview](#project-overview)\n- [Installation](#installation)\n- [API Documentation](#api)\n- [Notebook Timeline](#notebook-timeline)\n- [UI Interface](#ui)\n- [Metrics](#metrics)\n\n## Project Overview\nThis project combines computer vision and deep learning to analyze satellite/aerial imagery of agricultural fields. The system identifies:\n- 🌱 **Growing Land**: Fields currently under cultivation\n- 🛌 **Resting Land**: Fields lying fallow for seasonal recovery\n\n**Key Features:**\n- U-Net and DeepLabV3 segmentation models\n- FastAPI backend for processing requests\n- Dockerized deployment\n- Data augmentation pipeline\n- UI with PySide6\n\n## Installation\n\n### Prerequisites\n- Python 3.8+\n- Docker 20.10+\n- NVIDIA GPU (recommended for training)\n\n### Local Setup\n```bash\ngit clone git@github.com:nonezonyx/field_segmentation.git\ncd field_segmentation\n\n# Open \"saves\" directory and download checkpoints from gdrive\n\n# Install dependencies\npip install -r requirements.txt\n\n# Start API server\nuvicorn app:app --reload\n\n# or run ui\npython3 ui.py\n```\n\n### Docker Deployment\n```bash\ndocker-compose up --build\n```\n\n### API\n\nEndpoint: POST /process-land\n\nInput parameters:\n\n+ image: JPEG/PNG file upload\n\n+ width: float \u003e 0\n\n+ length: float \u003e 0\n\nResponse format:\n```json\n{\n\"processed_image\": \"base64_string\",\n\"growing_land\": float,\n\"resting_land\": float\n}\n```\n\nAccess interactive docs at http://localhost:8000/docs after deployment.\n\n### Notebook Timeline\n\n1. mask_creation.ipynb - Creating masks from annotations\n2. data_augmentation.ipynb - Image augmentation strategies\n3. unet_example.ipynb - U-Net model implementation\n4. DeepLabv3.ipynb - DeepLabV3+ configuration\n5. metrics.ipynb - UNet vs DeepLabv3 results comparison\n\n### UI\n\nSimple UI was created using PySide6\n![UI example](assets/screenshots/ui_main.png)\n\n### Metrics\n\nOverall DeepLabv3 showed better results (see ```metrics.ipynb```)\n\n![Metrics](assets/screenshots/results-comparison.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonezonyx%2Ffield_segmentation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonezonyx%2Ffield_segmentation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonezonyx%2Ffield_segmentation/lists"}