我正在尝试重新训练COCO上的预训练模型,以便从Pet数据集中检测图像。我跟着辅导开始了培训。但从结果来看,模型没有得到很好的训练
重新创建步骤:
git clone https://github.com/cocodataset/cocoapi.git
conda create --name tf_test python=3.6
conda activate tf_test
pip install tensorflow
pip install pillow, lxml, jupyter, matplotlib, opencv, contextlib2
for /f %i in ('dir /b object_detection\protos\*.proto') do protoc object_detection\protos\%i --python_out=.
conda install -c anaconda cython
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
cd TF\models\research\object_detection
jupyter notebook
目录结构:
然后:
cd TF
conda activate tf_test
python models\research\object_detection\dataset_tools\create_pet_tf_record.py
--data_dir=training\pet_dataset
--output_dir=training\pet_tf_records
--mask_type png
--label_map_path=models\research\object_detection\data\pet_label_map.pbtxt
相应地更改了配置文件中的路径
python models\research\object_detection\model_main.py
--model_dir=training\checkpoints
--num_train_steps 1000
--pipeline_config_path=training\model\mask_rcnn_inception_v2_coco.config
我得到了以下结果,在张力板上检查时,mAP从训练开始逐渐下降: 我得到以下结果:
Average Precision (AP) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.001
Average Precision (AP) @[ IoU=0.50 | area= all | maxDets=100 ] = 0.003
Average Precision (AP) @[ IoU=0.75 | area= all | maxDets=100 ] = 0.000
Average Precision (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000
Average Precision (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000
Average Precision (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.001
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 1 ] = 0.019
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets= 10 ] = 0.030
Average Recall (AR) @[ IoU=0.50:0.95 | area= all | maxDets=100 ] = 0.030
Average Recall (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = -1.000
Average Recall (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = -1.000
Average Recall (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.030
I0716 07:35:44.988143 3956 evaluation.py:275] Finished evaluation at 2019-07-16-07:35:44
I0716 07:35:44.988143 3956 estimator.py:2039] Saving dict for global step 196: DetectionBoxes_Precision/mAP = 0.00063327036, DetectionBoxes_Precision/mAP (large) = 0.00067928224, DetectionBoxes_Precision/mAP (medium) = -1.0, DetectionBoxes_Precision/mAP (small) = -1.0, DetectionBoxes_Precision/mAP@.50IOU = 0.0025016854, DetectionBoxes_Precision/mAP@.75IOU = 0.0002254508, DetectionBoxes_Recall/AR@1 = 0.018629802, DetectionBoxes_Recall/AR@10 = 0.030065296, DetectionBoxes_Recall/AR@100 = 0.030065296, DetectionBoxes_Recall/AR@100 (large) = 0.030065296, DetectionBoxes_Recall/AR@100 (medium) = -1.0, DetectionBoxes_Recall/AR@100 (small) = -1.0, Loss/BoxClassifierLoss/classification_loss = 0.11927358, Loss/BoxClassifierLoss/localization_loss = 0.10073859, Loss/BoxClassifierLoss/mask_loss = 2.1088743, Loss/RPNLoss/localization_loss = 0.11095625, Loss/RPNLoss/objectness_loss = 0.54912615, Loss/total_loss = 2.988967, global_step = 196, learning_rate = 0.0002, loss = 2.988967
拜托,你有什么建议我哪里出错了
目前没有回答
相关问题 更多 >
编程相关推荐