How bmw-innovationlab/bmw-tensorflow-training-gui works
Main Components
• Frontend (GUI):
• Located in the “gui” directory, built with Angular.
• Responsible for displaying the training dashboard, job configuration screens, logs, TensorBoard visualization, and providing a Swagger-based inference API testing interface.
• Training API:
• Found in the “training_api” folder.
• Handles configuration, data preparation, hyperparameter management, training orchestration, export of models (including checkpoints, inference graphs, TensorBoard export), and job life-cycle management.
• Inference API:
• Located in the “inference_api” folder.
• Provides the built-in REST API for testing and inference with trained models.
• Docker SDK API:
• In the “docker_sdk_api” folder.
• Manages container orchestration tasks such as starting/stopping containers, checking container statuses, and interacting with Docker (e.g., setting up ports, handling proxy configurations). It likely acts as an intermediary to the Docker engine.
• Shared Infrastructure & Datasets:
• Directories like “datasets”, “checkpoints”, and “tensorboards” serve as shared storage for input image/label data, training checkpoints, and TensorBoard logs.
• Configuration & Environment Components:
• Various JSON files (such as networks.json, paths.json, and objectclasses.json) and scripts (like setup_solution_parameters.sh, adjust_basedir_path.py, and proxy configuration utilities) manage system parameters, pre-trained weights selections, and deployment-level settings.
• Docker & Deployment:
• Dockerfiles (in training_api, inference_api, docker_sdk_api, and GUI directories) and multiple Docker Compose YAML files (“build_cpu.yml”, “build_gpu.yml”, “run_cpu.yml”, “run_gpu.yml”) illustrate a clear containerized microservice deployment pattern.
Out the Relationships and Data Flow
• The shared volumes or storage areas (“datasets”, “checkpoints”, “tensorboards”) are accessed by both training and inference processes. Represent these as a central resource that the Training API and Inference API both read/write.
Architectural Patterns and Design Principles
• The project has split responsibilities across microservices where each service (GUI, Training API, Inference API, Docker SDK API) follows a separation-of-concerns approach.
• Many folders follow the MVC or Domain Driven Design patterns, with “controllers”, “domain”, and “application” layers separating logic.
• Docker is used as the orchestration and deployment runtime, and Docker Compose files illustrate multi-container setups, enforcing containerization as a core design principle.
Technology/Framework Details
• Frontend: Angular framework
• Backend / API Services: Python-based REST APIs (likely using frameworks such as FastAPI or Flask integrated with uvicorn, as indicated by the uvicorn port configuration in docker_sdk_api/Dockerfile).
• Deep Learning: TensorFlow 2.5.0 used for training from pre-trained weights from the TensorFlow model zoo.
• Containerization: Docker, Docker Compose, NVIDIA Docker for GPU support.
• Data Format/Storage: JSON, XML (Pascal VOC) formats for labels; standard file/directory structures for datasets and checkpoint storage.
Putting It All Together
[User] → [Angular GUI]
↙ ↘
[Training API] [Inference API]
↘ ↙
[Docker SDK API]
• Next to these blocks, indicate shared resource blocks for “Datasets”, “Checkpoints”, and “TensorBoard Logs” along with an external dependency block for “Pre-trained Weights Source (TF Model Zoo)”.