Code Monkey home page Code Monkey logo

fair-utilities's Introduction

hot_fair_utilities ( Utilities for AI Assisted Mapping fAIr )

Initial lib was developed during Open AI Challenge with Omdena. Learn more about the challenge at here

This repo

This is a fork from the original (and on-going) HOT project, created with the aim to analyse its performance and to work on improving it.

The workflow and notes behind this project is in this HackMD (ask for access if needed).

Note:

  • write about the env file
  • write about the metric generation

hot_fair_utilities Installation

hot_fair_utilities is a collection of utilities which contains core logic for model data preparation, training and postprocessing. It can support multiple models, currently ramp is supported.

  1. To get started clone this repo first :

    git clone https://github.com/hotosm/fAIr-utilities.git
    
  2. Setup your virtualenv with python 3.8 ( Ramp is tested with python 3.8 )

  3. Install tensorflow 2.9.2 from [here] (https://www.tensorflow.org/install/pip) According to your os

Setup Ramp :

  1. Copy your basemodel : Basemodel is derived from ramp basemodel

    git clone https://github.com/radiantearth/model_ramp_baseline.git
    
  2. Clone ramp working dir

    git clone https://github.com/kshitijrajsharma/ramp-code-fAIr.git ramp-code
    
  3. Copy base model to ramp-code

    cp -r model_ramp_baseline/data/input/checkpoint.tf ramp-code/ramp/checkpoint.tf
    
  4. Install native bindings

    • Install Numpy

      pip install numpy==1.23.5
      
    • Install gdal .

      for eg : on Ubuntu

      sudo add-apt-repository ppa:ubuntugis/ppa && sudo apt-get update
      sudo apt-get install gdal-bin
      sudo apt-get install libgdal-dev
      export CPLUS_INCLUDE_PATH=/usr/include/gdal
      export C_INCLUDE_PATH=/usr/include/gdal
      pip install --global-option=build_ext --global-option="-I/usr/include/gdal" GDAL==`gdal-config --version`        
      

      on conda :

      conda install -c conda-forge gdal
      
    • Install rasterio

      for eg: on ubuntu :

      sudo apt-get install -y python3-rasterio
      

      on conda :

      conda install -c conda-forge rasterio
      
  5. Install ramp requirements

    Install necessary requirements for ramp and hot_fair_utilites

    cd ramp-code && cd colab && make install  && cd ../.. && pip install -e .
    

Conda Virtual Environment

Create from env fle

conda env create -f environment.yml

Create your own

conda create -n fAIr python=3.8
conda activate fAIr
conda install -c conda-forge gdal
conda install -c conda-forge geopandas
pip install pyogrio rasterio tensorflow
pip install -e hot_fair_utilities

Test Installation and workflow

You can run package_test.ipynb to your pc to test the installation and workflow with sample data provided

fair-utilities's People

Contributors

kshitijrajsharma avatar ciupava avatar

fair-utilities's Issues

Generate a metric to measure fAIr's performance

Summary

With the aim to improve fAIr's performance in detecting buildings footprint, it is foremost needed to generate a metric that allows to understand how the tool performs. Subsequently, steps can be taken to improve the tool, and they will be assessed against the same metric.

Impact & value

Impact score: 10/10
Urgency score: 10/10
Difficulty: 8/10

What needs to be done?

  • Run training + prediction on different datasets (e.g. another city/region of the world)
    • download datasets from OpenAerialMap and generate tiles in the same format of data/sample_2 (using this code?)
    • download correspondent labels from OSM data ...how?
    • run existing ramp code and generate new checkpoints for different cities
    • chose cities for comparison
    • perform different statistics/metrics to understand how well the tool does
  • test the different zoom levels, to see impact (TBC)
  • test different structures, either:
    • act on the existing RAMP architecture (turn on/off some layers)
    • scope for other TensorFlow architectures (find from what's available)

Who can help?


Effort estimate

  • 2/3 months time

Updates

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.