Sign inSign up

anisbhsl/disaster-assessment-web-app

By anisbhsl

•Updated about 7 years ago

Image
0

437

anisbhsl/disaster-assessment-web-app repository overview

⁠disaster-assessment

Computer Vision and Deep Learning based Disaster Impact Assessment from Satellite Imagery

⁠Instructions to run the program

  1. Start a MySQL server and create a database disaster_assessment if it doesn't exists
sudo apt install mysql-server
sudo service mysql start
  1. Start a redis server (The queueing library, kue, uses redis to queue and dispatch jobs)
sudo apt install redis-server
sudo service redis start
  1. Run npm install to install all the node packages listed in package.json. Please note the installation of gdal package can fail with recent versions of node. Use node v10.16 LTS.

  2. Create a folder ./src/model to store the neural network models. Download both segmentor and classifier into the folder and configure the file config.py to specify the model paths.

  3. Configure the .env file to specify the following information:

    a.  Database credentials
    
    b.  Path to Python Interpreter
    
  4. The selected Python Interpreter should have the following libraries associated with it:

    a.  numpy
    
    b.  pytorch (pytorch-cpu if no GPU)
    
    c.  rasterio
    
    d.  gdal2tiles
    

    It is suggested to use conda to manage the packages and provide the path to the interpreter inside the conda environment.

  5. Run npx sequelize db:migrate followed by npx sequelize db:seed:all to migrate the db and seed the admin user information. (You might need to use sequelize-cli in some installation). The admin credentials are: username: admin password: disasteradmin

  6. The impact tifs are saved in the folder ./analysisOutput/eventid/sectionid and the tiles are saved in the folder public/tiles/eventid/sectionid/{pre} or {post} or {impact}

  7. Run the program. Visit http://localhost:3000 and add event, section and upload images. Then Assess the Impact to generate the result. Be patient as it will take some time if you're not on GPU.

⁠Instructions to build Docker Image (This DOES NOT WORK as of now. In development)

  1. Run docker-compose build
docker-compose build
  1. Run docker-compose up:
docker-compose up
  1. Visit the following URL to view running application:
http://localhost:3000

Remember the application is running on port 3000 of docker container and it is mapped to port 3000 of host. (hostPORT:dockercontainerPORT)

Tag summary

Content type

Image

Digest

Size

1.3 GB

Last updated

about 7 years ago

docker pull anisbhsl/disaster-assessment-web-app