How kheffah/tensorflow_fcn8workflow works
Project Type and Overall Purpose
• This project implements a full workflow for fine-scale semantic segmentation using the FCN-8 architecture (with a VGG-16 backbone) in TensorFlow.
• It supports training and multiple prediction modes (test, all, unlabeled) on image datasets.
• The workflow integrates data handling/preprocessing, model definition, training/execution, and output visualization.
Top-Level Components
a. Entry Point and Command-Line Interface:
• Main runner (Run.py at the top level) which acts as the central execution controller.
• Additional Scripts/Run.py and Settings files that provide runtime parameters, particularly for sample runs.
b. Data Management and Preprocessing:
• The DataManagement.py file is responsible for managing datasets.
• The sampleRun directory contains the sample input images, preprocessing scripts (sampleRun/preprocess.py), and folders for storing results (sampleRun/results) and other assets.
c. Model Definition and Execution:
• The core model is defined in FCN8VGG16Model.py and run via FCN8VGG16Model_Run.py.
• These modules explain how the FCN8 (fully convolutional network) is built based on the VGG-16 architecture.
• The tensorflow-fcn submodule (included as a git submodule) provides additional building blocks required for model construction and training.
d. Utility and Visualization Components:
• PlottingUtils.py and ProjectUtils.py provide auxiliary functionalities for visualizations and project-specific utilities such as logging and possibly metrics.
e. Environment and Dependency Setup:
• Mention the README instructions for installing all required dependencies (e.g., TensorFlow GPU, numpy, scipy, etc.).
• The FCN-specific libraries, like tensorflow-fcn, are integrated into the workflow.
Relationships and Interactions
• Preprocessing (sampleRun/preprocess.py) cleans and prepares the data before feeding it to the model.
• DataManagement.py orchestrates data provisioning for model training and prediction.
• The FCN8VGG16Model.py builds the network architecture by invoking routines from the tensorflow-fcn submodule, possibly loading VGG16 weights (downloaded as described in the README).
• FCN8VGG16Model_Run.py then drives the execution of training/predicting operations.
• Finally, output files (predictions, visualizations) are generated and possibly further processed by PlottingUtils.py.
Architectural Patterns and Technologies
• The project follows a modular design where each concern (data management, model building, training execution, result visualization) is encapsulated in its own Python module.
• Use of TensorFlow for building and running the FCN model.
• Leveraging a pre-trained VGG-16 model, the workflow downloads and incorporates the relevant weights.
• The approach shows practices of decoupling functionality: separate modules for data handling, model definition, and execution.