Skip to main content

Week 04

  • submit job for nd vs d with 80, 486 on narval (pretrained=False)

    • add precision and recall for nd vs d
    • confusion matrix
  • sort out images for defect and train only defect adnormally model

  • submit job with mobilenet for nd vs d model and multi-labels classification models

thesis seminar

  • on April 6
  • presentation for Sean
  • then modify the presentation for the seminar
    • how we interpret the video and human error
    • theory
    • abstract: 5 sentences and the title.
      • The importance of the work
      • What I have done
      • What the data were
      • Prelimary Results
      • Ongoing works...

March 21

Problem with nd vs defect model script

  • submit the job with only method 2 for nd vs defect model run with 80 videos
    • with runid dnv_80_2_resubmit
  • submit the prediction script and use method 2 to get the test score
    • with model created from the old script (fastai_nd_vs_d_DNV_dnv_80_2.pkl)
    • with model created from the new script (fastai_nd_vs_d_DNV_dnv_80_2_new.pkl)

assign label to SD1 images

  • Input: csv file output from label extraction from Azure JSON
  • Things that are different from DNV video
    • the video starts on the surface
    • the distance is reset to zero when they began the survey
    • the camera is panned to defect/feature when entering the code
    • the distance is in feet
    • the distance can decrease
    • some videos did not end with access point or MSA (e.g., 10182022-104134 AM-CHANDLER MANCHESTER.mp4)

assign label to COV images

  • Things that are different from the DNV video

    • distance is in two decimal places
    • distance can decrease
    • the camera is panned to defect/feature when entering the code
  • Additional logic that is relevant to DNV, SD1, and COV dataset

    • need to implement a logic if two defects are close together (for example, less than 0.5 m), including the defect label with a greater distance in the frame of the defect with a smaller distance value. For example, if the root is found at 5.05 and the tap factory is found at 5.18 m. The tap factory is likely to appear in the frames with a distance of 5.05m. Therefore, a frame with distance = 5.05m will have both labels, root and tap factory.

    000019-__FJBYYX-D-2023-01-05_008040.png

March 22

  • how first start with large data model and then fine tune with smaller data affect the model performance?
    • Compare the computing time? is it worthed?
  • freeze_epoch = 4, it will trained for 4 epochs --> and train head layers with downloaded weight for 4 epochs. Then train it for number epoch specified by user by unfreezing all layer.
  • for pretrained = False, and call learn.fit_flat_cos() (initialize weight randomly)

  • for pretrained = True,

  • learn.fine_tune(10, lr, freeze_epochs=10)

  • learn.fine_tune(10, lr, freeze_epochs=1)

  • compare between fine_tune(),

List of runs

  • Multi-labels classification runs with loaded weight (pretrained = False, RANDOM_WEIGHT = False) with bs =32 and ResNet50for 4 k folds

    • images from 486 DNV videos, with learn.fine_tune(10, 0.001, freeze_epochs=1) x 4 runs
    • images from 486 DNV videos, with learn.fine_tune(10, 0.001, freeze_epochs=4) x 4 runs
    • images from 486 DNV videos, with learn.fine_tune(10, 0.001, freeze_epochs=10) x 4 runs(This might have to run with smaller bs)
    • images from 80 DNV videos, with learn.fine_tune(10, 0.001, freeze_epochs= y) x 4 runs, where y is the best freeze_epochs from 486 DNV videos runs.
  • Multi-labels classification runs with ramdom weight (pretrained = False, RANDOM_WEIGHT = True) with bs =32 and ResNet50 for 4 k folds

    • images from 486 DNV videos, with fit_flat_cos(10+y, 0.001) x 4 runs
    • images from 80 DNV videos, with fit_flat_cos(10+y, 0.001) x 4 runs, where y is the best freeze_epochs from 486 DNV videos runs.
  • Multi-labels classification runs with loaded weight (pretrained = False, RANDOM_WEIGHT = False) with bs =32 and ResNet50 for 4 k folds

    • images from 486 DNV videos, with learn.fit_flat_cos(y,0.001), learn.unfreeze(), learn.fit_flat_cos(10) x 4 runs
    • images from 80 DNV videos, with learn.fit_flat_cos(y,0.001), learn.unfreeze(), learn.fit_flat_cos(10) x 4 runs, where y is the best freeze_epochs from 486 DNV videos runs.
  • Multi-labels classification runs with loaded weight (pretrained = False, RANDOM_WEIGHT = False) with bs =32 and mobilenet_v3_largefor 4 k folds

    • images from 486 DNV videos, with learn.fine_tune(10, 0.001, freeze_epochs=y) x 4 runs
    • images from 80 DNV videos, with learn.fine_tune(10, 0.001, freeze_epochs=y) x 4 runs
    • images from 486 DNV videos, with learn.fit_flat_cos(y,0.001), learn.unfreeze(), learn.fit_flat_cos(10) x 4 runs
    • images from 80 DNV videos, with learn.fit_flat_cos(y,0.001), learn.unfreeze(), learn.fit_flat_cos(10) x 4 runs,
  • Multi-labels classification runs with random weight (pretrained = False, RANDOM_WEIGHT = True) with bs =32 and mobilenet_v3_largefor 4 k folds

    • images from 486 DNV videos, with fit_flat_cos(10+y, 0.001) x 4 runs
    • images from 80 DNV videos, with fit_flat_cos(10+y, 0.001) x 4 runs, where y is the best freeze_epochs from 486 DNV videos runs.
  • ND vs D runs with random weight (pretrained = False, RANDOM_WEIGHT = True) with bs=32

    • images from 486 DNV videos, with fit_flat_cos(10+y, 0.001), ResNet50
    • images from 80 DNV videos, with fit_flat_cos(10+y, 0.001), ResNet50
    • images from 486 DNV videos, with fit_flat_cos(10+y, 0.001), mobilenet_v3_large
    • images from 80 DNV videos, with fit_flat_cos(10+y, 0.001), mobilenet_v3_large, where y is the best freeze_epochs from 486 DNV videos runs.
  • ND vs D runs with loaded weight (pretrained = False, RANDOM_WEIGHT = False) with bs=32

    • images from 486 DNV videos, with learn.fine_tune(10, 0.001, freeze_epochs=y), ResNet50
    • images from 80 DNV videos, with learn.fine_tune(10, 0.001, freeze_epochs=y), ResNet50
    • images from 486 DNV videos, with learn.fine_tune(10, 0.001, freeze_epochs=y),mobilenet_v3_large
    • images from 80 DNV videos, with learn.fine_tune(10, 0.001, freeze_epochs=y), mobilenet_v3_large
    • images from 486 DNV videos, with learn.fit_flat_cos(y,0.001), learn.unfreeze(), learn.fit_flat_cos(10), ResNet50
    • images from 80 DNV videos, with learn.fit_flat_cos(y,0.001), learn.unfreeze(), learn.fit_flat_cos(10), ResNet50
    • images from 486 DNV videos, with learn.fit_flat_cos(y,0.001), learn.unfreeze(), learn.fit_flat_cos(10),mobilenet_v3_large
    • images from 80 DNV videos, withlearn.fit_flat_cos(y,0.001), learn.unfreeze(), learn.fit_flat_cos(10), mobilenet_v3_large, where y is the best freeze_epochs from 486 DNV videos runs.

March 23

FME to Python

  • Clone FME to python on window
  • activate arcgispro-py3 environment
  • cd where to FME to python folder
  • pip install -e .

how to activate arcpy environment on window terminal?

CCTV

  • Even though,

  • can use AI model to update your ground true (data)

  • Get SD1 labels done

  • train model with SD1 data only

  • Fine tune DNV with SD1 data

  • train mdoel with SD1 and DNV data

  • list of SD1-video_type_4 that need to be examed further:

    • 1132022-80704 AM-COREY BREWER (manually edited):
      • There was no assigned distance from the 012360th frame onwards. I have reviewed the video. The pipe was capped. The camera stayed could not move foward and the distance remained with at the 5 feet point. Therefore, I decided to assign 5 feet as a distance for 012360th frame onwards.
      • The values from custom_field_distance_with_LF column were assigned to distance column for the rest of the frames.
    • 1132022-112314 AM-COREY BREWER (manually edited)
      • The values from custom_field_distance_with_LF column were assigned to distance column for 0th - 19290th frame
      • from 019320th frame onwards, distance is equal to 33.3 + distance in custom_field_distance_with_LF because values in custom_field_distance_with_LF column were reset to zero.
    • 1132022-104359 AM-COREY BREWER
      • delete the last row because it has distance of zero. I did this to prevent find_start_of_survey_index from assigning the index of the last row as the start of the survey.
      • The values from custom_field_distance_with_LF column were assigned to distance column for the rest of the frames.

March 24

  • SD1 PACP codes that are different from current PACP standards:
    • DV (Deformed Vertical) -> DFBR (Deformed flexible bulging round) (11102022-105905 AM-CHANDLER MANCHESTER_009210.png)
    • XP -> X
    • the edited version can be found in "labels_SD1_114videos_edited_labels_to_current_PACP.csv"