Executive Summary
Melissa's wishlist
Things to include in CCTV Executive Summary and High level documents.
- Quick Blurb on what the project is about. (Links to our marketing material to be added by Jake)
- High Level overview of CCTV.
- Difference Between CV and ML
- How we use both in CCTV.
- Any Terms that are The same over a model.
- Models, Training, Testing, and Prediction what is what and how GQC handles the training and testing datasets.
- Links to the papers and presentations.
- Link to converted markdowns from Vannary's Metadata doc and data org. doc.
Other Documents: 6. List of Virtual Envs and what specifically they are meant for. 7. Where source material is located.
- Datasets
- Databases
- Notes
In ML and CV What are py Files and what are notebooks. We do not change Py files. The Pyfile from Notebook 7 for ML has been edited. This is an exception.
CV Pipeline
The CV pipeline trains a model and calculates inferences using three repositories.
The CV pipeline is comprised of two repositories: gqc-utility-notebooks and compute-msi. The gqc-utility-notebooks repository processes the received inspection data, generating training and testing CSV files along with blurred frames used for both training and inference. The compute-msi repository utilizes these training and testing CSVs, as well as the blurred frames, to train either a one-stage or two-stage CV model. It also contains scripts for model inference once the training is complete.
Apart from the gqc-utility-notebooks and compute-msi repositories, we use the cctv-apps repository to load images on a carousel and run inferencing using the model on an image-by-image basis.
It is important to use the 11 notebooks from the gqc-utility-notebooks repository (which are described in the following section) and then the relevant .py files from the compute-msi repository.
::: warning The CCTV CV notebooks are run on a dataset by dataset basis. You have to specify the dataset to run in the .yml file. :::
| Notebook Order | Notebook Name | Python File Name | Description |
|---|---|---|---|
| 1 | cctv-video_list-creator.ipynb | video_list_creator.py | This module forms Video-Groups and creates video lists based on that. This considers subfolders inside Recieved Data folder as the Video-Groups and all video files inside those subfolders are added as Video-Group members recursively. |
| 2 | metadata_DB_extract_inspection_condition_data.ipynb | extract_inspection_condition_data.py | This module takes the inspection database (which can either be .mdb or .dbf) and creates a condition data CSV file called all_conditions.csv |
| 3 | cctv-import_supplementary_data.ipynb | import_suppl_data.py | This module import distance regions, video-types, Condition_code_standard, and all_conditions CSV files into Video_DB as separate tables. It also updates videos table's video-type column. |
| 4 | cctv-frame-extraction.ipynb | frame_extractor.py | This module extracts frames from a list of videos and saves them under a zip file. |
| 5 | cctv-full-frame-stitch-and-Azure-OCR.ipynb | stitch_and_ocr.py | This will do the following:Run Azure OCR on 6 stacked full frames,The OCR results will be saved to OCR_JSON column in the frames table which can be used for blurring in the next stage. |
| 6 | cctv-save-blurred-frames.ipynb | blur_frames.py | This module takes in the extracted frames and the CSV files generated by cctv-frame-extraction.ipynb utility and recognize the text present in the frames. |
| 7 | cctv-extract-distance-values.ipynb | extract_distance_values.py | This module takes in the OCR_JSON column in the frames table containing OCR results and extracts the distance values |
| 8 | cctv-distance-value-post-processing.ipynb | distance_postprocessor.py | This module processes the distance values detected by OCR to remove outliers and fill in the frames without distances by linear interpolation and extrapolation. |
| 9 | cctv-extract-condition_codes.ipynb | extract_condition_codes.py | This module takes in the OCR_JSON column in the frames table containing OCR results and extracts condition codes. |
| 10 | cctv_SD1_label_images.ipynb | SD1_label_images.py | This notebook is used to assign condition codes to each frame. |
| 11 | cctv-prepare-cctv-training-csv.ipynb | training_data_splitter.py | This module creates the correct data split between training, validation and test and writes the training, validation, and test into the sqlite3 database. |
ML Pipeline
Details for this pipeline specific to DNV are available here