137 train_config {
138   batch_size: 10
139   data_augmentation_options {
140     random_horizontal_flip {
141     }
142   }
143   data_augmentation_options {
144     ssd_random_crop {
145     }
146   }
147   sync_replicas: true
148   optimizer {
149     momentum_optimizer {
150       learning_rate {
151         cosine_decay_learning_rate {
152           learning_rate_base: 0.800000011920929
153           total_steps: 50000
154           warmup_learning_rate: 0.13333000242710114
155           warmup_steps: 2000
156         }
157       }
158       momentum_optimizer_value: 0.8999999761581421
159     }
160     use_moving_average: false
161   }
162   fine_tune_checkpoint: "ssd_mobilenet_v2_320x320_coco17_tpu-8/checkpoint/ckpt-0"
163   num_steps: 50000
164   startup_delay_steps: 0.0
165   replicas_to_aggregate: 8
166   max_number_of_boxes: 100
167   unpad_groundtruth_tensors: false
168   fine_tune_checkpoint_type: "detection"
169   fine_tune_checkpoint_version: V2
170 }


148   optimizer {
149     momentum_optimizer {
150       learning_rate {
151         cosine_decay_learning_rate {
152           learning_rate_base: 0.800000011920929
153           total_steps: 50000
154           warmup_learning_rate: 0.13333000242710114
155           warmup_steps: 2000
156         }
157       }
158       momentum_optimizer_value: 0.8999999761581421
159     }
160     use_moving_average: false
161   }

[링크 : https://github.com/tensorflow/models/blob/master/research/object_detection/configs/tf2/ssd_mobilenet_v2_320x320_coco17_tpu-8.config]

[링크 : https://blog.naver.com/bdh0727/221537759295]

 

+

ModuleNotFoundError: No module named 'tf_slim'
ModuleNotFoundError: No module named 'pycocotools'
ModuleNotFoundError: No module named 'lvis

 

num_train_steps=1로 하니 cpu 로만 학습해도 1회 뿐이라 금세 끝난다.

$ python3 model_main_tf2.py --pipeline_config_path=ssd_mobilenet_v2_320x320_coco17_tpu-8/pipeline.config --model_dir=trained-checkpoint --alsologtostderr --num_train_steps=1 --sample_1_of_n_eval_examples=1 --num_eval_steps=1
$ find ./ -type f -mmin -10
/trained-checkpoint/train/events.out.tfevents.1612780803.mini2760p.5335.2928.v2

 

$ python3 exporter_main_v2.py --input_type image_tensor --pipeline_config_path ./ssd_mobilenet_v2_320x320_coco17_tpu-8/pipeline.config --trained_checkpoint_dir ./trained-checkpoint --output_directory exported-model/mobile-model
$ find ./ -type f -mmin -10
./exported-model/mobile-model/saved_model/variables/variables.index
./exported-model/mobile-model/saved_model/variables/variables.data-00000-of-00001
./exported-model/mobile-model/saved_model/saved_model.pb
./exported-model/mobile-model/checkpoint/checkpoint
./exported-model/mobile-model/checkpoint/ckpt-0.data-00000-of-00001
./exported-model/mobile-model/checkpoint/ckpt-0.index
./exported-model/mobile-model/pipeline.config

 

[링크 : https://github.com/abhimanyu1990/SSD-Mobilenet-Custom-Object-Detector-Model-using-Tensorflow-2] <<

[링크 : https://stackoverflow.com/questions/64510791/tf2-object-detection-api-model-main-tf2-py-validation-loss]

[링크 : https://ichi.pro/ko/tensorflow-gaegche-gamji-gaideu-tensorflow-2-252181752953859]

 

+

[링크 : https://neptune.ai/blog/how-to-train-your-own-object-detector-using-tensorflow-object-detection-api]

 

+

[링크 : https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/auto_examples/plot_object_detection_saved_model.html]

[링크 : https://github.com/tensorflow/models/tree/master/research/object_detection/configs/tf2]

[링크 : https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf2_detection_zoo.md]

'프로그램 사용 > yolo_tensorflow_golo' 카테고리의 다른 글

fpn - Feature Pyramid Network  (0) 2021.02.11
tensorflow pipeline.config  (0) 2021.02.10
tensorflow pipeline.conf  (0) 2021.02.08
tf object detection COCO  (0) 2021.02.05
tensorflow lite SELECT_TF_OPS  (0) 2021.02.02
saved_model_cli  (0) 2021.02.02
Posted by 구차니

댓글을 달아 주세요