Skip to main content

Single Shot MultiBox Detector - SSD

Project description

Single Shot Multibox Detector - Facade Parsing

Semester Project at Swiss Data Science Center @EPFL

Description

This project is a collaboration between the Civil Engineers and the Swiss Data Science Center(SDSC) at EPFL. The motivation behind the project is to help Civil Engineers in detecting the damage imposed on buildings by an earthquake. In this semester project, only a sub-part of the whole project has been tackled. By using deep learning, we automate the detection of important objects in an given image. As a deep learning method we are using the Single Shot MultiBox Detector.

Find more details about the project in the report.pdf.

Install

To install the ssd_project library and use it within your python environment:

pip install ssd-project==1.0

Examples on how to use

Examples for various functions and sub-tasks of the project can be found in the Notebooks folder.

Training

To train, the train.py script is ready to use:

usage: train.py [-h] [--epochs EPOCHS] [--split-seed SPLIT_RATIO]
                [--batch-train BATCH_SIZE] [--lr LR]
                [--model PRETRAINED_MODEL] [--path_imgs PATH_IMGS]
                [--path_bboxes PATH_BBOXES] [--path_labels PATH_LABELS]

Train an SSD model

optional arguments:
  -h, --help            show this help message and exit
  --epochs EPOCHS
  --split-seed SPLIT_RATIO
  --batch-train BATCH_SIZE
  --lr LR
  --model PRETRAINED_MODEL
  --path_imgs PATH_IMGS
  --path_bboxes PATH_BBOXES
  --path_labels PATH_LABELS

For example:

python3 train.py --epochs=500
python train.py --model saved_models/BEST_model_ssd300.pth.tar

For loading a pretrained a model python train.py --model saved_models/BEST_model_ssd300.pth.tar

When training a new model, the train.py script saves a specific structure, therefore to continue training from the best specific point, just give as input to the saved structure.

Predicting

For predictions, one should look into notebooks/results.ipynb

Ground Truth & Aspect Ratios

notebooks/creation_ground_truth.ipynb shows how the ground truth was derived. notebooks/Aspect_Ratios.ipynb shows how aspect ratios and scales for prior box are derived

Transofrmations

notebooks/Data Augmentations Examples.ipynb shows an example of all the transformations applied to one image.

Outputs

The best model is saved in saved_model/first_best_model_ssd300.pth.tar

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ssd_project-1.1-py2-none-any.whl (22.8 kB view details)

Uploaded Python 2

File details

Details for the file ssd_project-1.1-py2-none-any.whl.

File metadata

  • Download URL: ssd_project-1.1-py2-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/2.7.16

File hashes

Hashes for ssd_project-1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 2f3a27003efc0ba2868d31f6e7383289616f7f147a2b8e2e8765d8a0470a53d0
MD5 0f9b2b50c4832659b1afd25e8c9f230d
BLAKE2b-256 f6c5eb696d5580e66e287805fef4623f8e2385c5a055eed9e3bf63d58a99b3c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page