Skip to content

Commit

Permalink
Training params & results
Browse files Browse the repository at this point in the history
  • Loading branch information
pepisg committed Sep 21, 2022
1 parent a241452 commit 032adf0
Show file tree
Hide file tree
Showing 8 changed files with 1,033 additions and 205 deletions.
Binary file added animation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added animation1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions create_splits.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def split(source, destination):
Path(val_path).mkdir(parents=True, exist_ok=True)
available_files = os.listdir(source)
random.shuffle(available_files)
train_samples = int(len(available_files)*0.8)
val_samples = int(len(available_files)*0.15)
train_samples = int(len(available_files)*0.7)
val_samples = int(len(available_files)*0.2)
test_samples = len(available_files) - train_samples - val_samples
for idx, file in enumerate(available_files):
if idx < train_samples:
Expand Down
276 changes: 276 additions & 0 deletions experiments/reference/exported/pipeline.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
model {
ssd {
num_classes: 3
image_resizer {
fixed_shape_resizer {
height: 640
width: 640
}
}
feature_extractor {
type: "ssd_resnet50_v1_fpn_keras"
depth_multiplier: 1.0
min_depth: 16
conv_hyperparams {
regularizer {
l2_regularizer {
weight: 0.0004
}
}
initializer {
truncated_normal_initializer {
mean: 0.0
stddev: 0.03
}
}
activation: RELU_6
batch_norm {
decay: 0.997
scale: true
epsilon: 0.001
}
}
override_base_feature_extractor_hyperparams: true
fpn {
min_level: 3
max_level: 7
}
}
box_coder {
faster_rcnn_box_coder {
y_scale: 10.0
x_scale: 10.0
height_scale: 5.0
width_scale: 5.0
}
}
matcher {
argmax_matcher {
matched_threshold: 0.5
unmatched_threshold: 0.5
ignore_thresholds: false
negatives_lower_than_unmatched: true
force_match_for_each_row: true
use_matmul_gather: true
}
}
similarity_calculator {
iou_similarity {
}
}
box_predictor {
weight_shared_convolutional_box_predictor {
conv_hyperparams {
regularizer {
l2_regularizer {
weight: 0.0004
}
}
initializer {
random_normal_initializer {
mean: 0.0
stddev: 0.01
}
}
activation: RELU_6
batch_norm {
decay: 0.997
scale: true
epsilon: 0.001
}
}
depth: 256
num_layers_before_predictor: 4
kernel_size: 3
class_prediction_bias_init: -4.6
}
}
anchor_generator {
multiscale_anchor_generator {
min_level: 3
max_level: 7
anchor_scale: 4.0
aspect_ratios: 1.0
aspect_ratios: 2.0
aspect_ratios: 0.5
scales_per_octave: 2
}
}
post_processing {
batch_non_max_suppression {
score_threshold: 1e-08
iou_threshold: 0.6
max_detections_per_class: 100
max_total_detections: 100
use_static_shapes: false
}
score_converter: SIGMOID
}
normalize_loss_by_num_matches: true
loss {
localization_loss {
weighted_smooth_l1 {
}
}
classification_loss {
weighted_sigmoid_focal {
gamma: 2.0
alpha: 0.25
}
}
classification_weight: 1.0
localization_weight: 1.0
}
encode_background_as_zeros: true
normalize_loc_loss_by_codesize: true
inplace_batchnorm_update: true
freeze_batchnorm: false
}
}
train_config {
batch_size: 2
data_augmentation_options {
random_horizontal_flip {
}
}
data_augmentation_options {
random_crop_image {
min_object_covered: 0.0
min_aspect_ratio: 0.75
max_aspect_ratio: 3.0
min_area: 0.75
max_area: 1.0
overlap_thresh: 0.0
}
}
sync_replicas: true
optimizer {
momentum_optimizer {
learning_rate {
cosine_decay_learning_rate {
learning_rate_base: 0.04
total_steps: 25000
warmup_learning_rate: 0.013333
warmup_steps: 2000
}
}
momentum_optimizer_value: 0.9
}
use_moving_average: false
}
fine_tune_checkpoint: "/workspace/experiments/pretrained_model/ssd_resnet50_v1_fpn_640x640_coco17_tpu-8/checkpoint/ckpt-0"
num_steps: 25000
startup_delay_steps: 0.0
replicas_to_aggregate: 8
max_number_of_boxes: 100
unpad_groundtruth_tensors: false
fine_tune_checkpoint_type: "detection"
use_bfloat16: false
fine_tune_checkpoint_version: V2
}
train_input_reader {
label_map_path: "/workspace/experiments/label_map.pbtxt"
tf_record_input_reader {
input_path: "/workspace/data/train/segment-1022527355599519580_4866_960_4886_960_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10927752430968246422_4940_000_4960_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10072140764565668044_4060_000_4080_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10750135302241325253_180_000_200_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11139647661584646830_5470_000_5490_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10023947602400723454_1120_000_1140_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11718898130355901268_2300_000_2320_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10964956617027590844_1584_680_1604_680_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-1172406780360799916_1660_000_1680_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11070802577416161387_740_000_760_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-12200383401366682847_2552_140_2572_140_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10923963890428322967_1445_000_1465_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-1191788760630624072_3880_000_3900_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-12179768245749640056_5561_070_5581_070_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10664823084372323928_4360_000_4380_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10599748131695282446_1380_000_1400_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11566385337103696871_5740_000_5760_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11113047206980595400_2560_000_2580_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11119453952284076633_1369_940_1389_940_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-1083056852838271990_4080_000_4100_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10072231702153043603_5725_000_5745_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11004685739714500220_2300_000_2320_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10975280749486260148_940_000_960_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10517728057304349900_3360_000_3380_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10786629299947667143_3440_000_3460_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-1051897962568538022_238_170_258_170_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11252086830380107152_1540_000_1560_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11928449532664718059_1200_000_1220_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11392401368700458296_1086_429_1106_429_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11799592541704458019_9828_750_9848_750_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10096619443888687526_2820_000_2840_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11674150664140226235_680_000_700_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11971497357570544465_1200_000_1220_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10584247114982259878_490_000_510_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10676267326664322837_311_180_331_180_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10391312872392849784_4099_400_4119_400_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-12027892938363296829_4086_280_4106_280_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10212406498497081993_5300_000_5320_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11940460932056521663_1760_000_1780_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11183906854663518829_2294_000_2314_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11379226583756500423_6230_810_6250_810_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10327752107000040525_1120_000_1140_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10075870402459732738_1060_000_1080_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10793018113277660068_2714_540_2734_540_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10153695247769592104_787_000_807_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11623618970700582562_2840_367_2860_367_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10107710434105775874_760_000_780_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10526338824408452410_5714_660_5734_660_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-12161824480686739258_1813_380_1833_380_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10444454289801298640_4360_000_4380_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10275144660749673822_5755_561_5775_561_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10231929575853664160_1160_000_1180_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10206293520369375008_2796_800_2816_800_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11017034898130016754_697_830_717_830_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-12012663867578114640_820_000_840_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11846396154240966170_3540_000_3560_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-1005081002024129653_5313_150_5333_150_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11489533038039664633_4820_000_4840_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11967272535264406807_580_000_600_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10625026498155904401_200_000_220_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11454085070345530663_1905_000_1925_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10500357041547037089_1474_800_1494_800_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11925224148023145510_1040_000_1060_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11199484219241918646_2810_030_2830_030_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11839652018869852123_2565_000_2585_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-11060291335850384275_3761_210_3781_210_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10455472356147194054_1560_000_1580_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10017090168044687777_6380_000_6400_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-12174529769287588121_3848_440_3868_440_with_camera_labels.tfrecord"
input_path: "/workspace/data/train/segment-10963653239323173269_1924_000_1944_000_with_camera_labels.tfrecord"
}
}
eval_config {
metrics_set: "pascal_voc_detection_metrics"
use_moving_averages: false
}
eval_input_reader {
label_map_path: "/workspace/experiments/label_map.pbtxt"
shuffle: false
num_epochs: 1
tf_record_input_reader {
input_path: "/workspace/data/val/segment-11318901554551149504_520_000_540_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-11219370372259322863_5320_000_5340_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-11388947676680954806_5427_320_5447_320_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10940952441434390507_1888_710_1908_710_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-11076364019363412893_1711_000_1731_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10485926982439064520_4980_000_5000_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10724020115992582208_7660_400_7680_400_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-11355519273066561009_5323_000_5343_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10596949720463106554_1933_530_1953_530_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10734565072045778791_440_000_460_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10498013744573185290_1240_000_1260_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10588771936253546636_2300_000_2320_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10082223140073588526_6140_000_6160_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-11343624116265195592_5910_530_5930_530_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-1146261869236413282_1680_000_1700_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10226164909075980558_180_000_200_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10241508783381919015_2889_360_2909_360_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10094743350625019937_3420_000_3440_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-10876852935525353526_1640_000_1660_000_with_camera_labels.tfrecord"
input_path: "/workspace/data/val/segment-1208303279778032257_1360_000_1380_000_with_camera_labels.tfrecord"
}
}
Loading

0 comments on commit 032adf0

Please sign in to comment.