--- title: LaDeco emoji: 👀 colorFrom: gray colorTo: blue sdk: gradio sdk_version: 5.31.0 app_file: app.py pinned: false short_description: 'LaDeco: A tool to analyze visual landscape elements' --- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference # LaDeco - Landscape Environment Semantic Analysis Model LaDeco is a tool that analyzes landscape images, performs semantic segmentation to identify different elements in the scene (sky, vegetation, buildings, etc.), and enables region-based color matching between images. ## Features ### Semantic Segmentation - Analyzes landscape images and segments them into different semantic regions - Provides area ratio analysis for each landscape element ### Region-Based Color Matching - Matches colors between corresponding semantic regions of two images - Shows visualization of which regions are being matched between images - Offers multiple color matching algorithms: - **adain**: Adaptive Instance Normalization - Matches mean and standard deviation of colors - **mkl**: Monge-Kantorovich Linearization - Linear transformation of color statistics - **reinhard**: Reinhard color transfer - Simple statistical approach that matches mean and standard deviation - **mvgd**: Multi-Variate Gaussian Distribution - Uses color covariance matrices for more accurate matching - **hm**: Histogram Matching - Matches the full color distribution histograms - **hm-mvgd-hm**: Histogram + MVGD + Histogram compound method - **hm-mkl-hm**: Histogram + MKL + Histogram compound method ## Installation 1. Clone this repository 2. Create a virtual environment: `python3 -m venv .venv` 3. Activate the virtual environment: `source .venv/bin/activate` 4. Install requirements: `pip install -r requirements.txt` 5. Run the application: `python app.py` ## Usage 1. Upload two landscape images - the first will be the color reference, the second will be color-matched to the first 2. Choose a color matching method from the dropdown menu 3. Click "Start Analysis" to process the images 4. View the results in the Segmentation and Color Matching tabs - Segmentation tab shows the semantic segmentation and area ratios for both images - Color Matching tab shows the matched regions visualization and the color matching result ## Reference Li-Chih Ho (2023), LaDeco: A Tool to Analyze Visual Landscape Elements, Ecological Informatics, vol. 78. https://www.sciencedirect.com/science/article/pii/S1574954123003187