训练我的fast_rcnn_inception_v2_coco模型时出错

时间:2019-09-05 15:24:17

标签: tensorflow object-detection training-data faster-rcnn labelimg

在Windows 8上使用TensorFlow(CPU)训练多个对象的对象检测分类器 发出以下命令会使我出现此错误:

python train.py --logtostderr --train_dir = training / --pipeline_config_path = training / faster_rcnn_inception_v2_pets.config

W0905 19:31:26.166561  7036 variables_helper.py:157] Variable [SecondStageFeatur
eExtractor/InceptionV2/Mixed_5c/Branch_3/Conv2d_0b_1x1/BatchNorm/gamma/Momentum]
 is not available in checkpoint
W0905 19:31:26.166561  7036 variables_helper.py:157] Variable [SecondStageFeatur
eExtractor/InceptionV2/Mixed_5c/Branch_3/Conv2d_0b_1x1/weights/Momentum] is not
available in checkpoint
W0905 19:31:26.166561  7036 variables_helper.py:157] Variable [global_step] is n
ot available in checkpoint
W0905 19:31:28.854089  7036 deprecation.py:323] From C:\Users\AISHA\Anaconda3\li
b\site-packages\tensorflow\contrib\slim\python\slim\learning.py:742: Supervisor.
__init__ (from tensorflow.python.training.supervisor) is deprecated and will be
removed in a future version.
Instructions for updating:
Please switch to tf.train.MonitoredTrainingSession
2019-09-05 19:31:52.299150: I tensorflow/core/platform/cpu_feature_guard.cc:145]
 This TensorFlow binary is optimized with Intel(R) MKL-DNN to use the following
CPU instructions in performance critical operations:  AVX AVX2
To enable them in non-MKL-DNN operations, rebuild TensorFlow with the appropriat
e compiler flags.
2019-09-05 19:31:53.046831: I tensorflow/core/common_runtime/process_util.cc:115
] Creating new thread pool with default inter op setting: 4. Tune using inter_op
_parallelism_threads for best performance.
W0905 19:31:53.057435  7036 deprecation.py:323] From C:\Users\AISHA\Anaconda3\li
b\site-packages\tensorflow\python\training\saver.py:1276: checkpoint_exists (fro
m tensorflow.python.training.checkpoint_management) is deprecated and will be re
moved in a future version.
Instructions for updating:
Use standard file APIs to check for files with this prefix.
I0905 19:31:53.073088  7036 saver.py:1280] Restoring parameters from training/mo
del.ckpt-0
W0905 19:32:09.260713  7036 deprecation.py:323] From C:\Users\AISHA\Anaconda3\li
b\site-packages\tensorflow\python\training\saver.py:1066: get_checkpoint_mtimes
(from tensorflow.python.training.checkpoint_management) is deprecated and will b
e removed in a future version.
**Instructions for updating:
Use standard file utilities to get mtimes.
I0905 19:32:09.260713  7036 session_manager.py:500] Running local_init_op.
I0905 19:32:12.729500  7036 session_manager.py:502] Done running local_init_op.
I0905 19:33:21.745800  7036 learning.py:754] Starting Session.
I0905 19:33:22.308308  2844 supervisor.py:1117] Saving checkpoint to path traini
ng/model.ckpt
I0905 19:33:22.323910  7036 learning.py:768] Starting Queues.
I0905 19:33:35.167791  5528 supervisor.py:1099] global_step/sec: 0
I0905 19:36:05.575444  5528 supervisor.py:1099] global_step/sec: 0
Fatal Python error: Aborted**

Thread 0x000015c8 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 296 in wait
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 552 in wait
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\co
ordinator.py", line 311 in wait_for_stop
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\qu
eue_runner_impl.py", line 293 in _close_on_stop
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 865 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x00001b4c (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1279 in _single_operation_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\qu
eue_runner_impl.py", line 257 in _run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 865 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x00000e28 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 296 in wait
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 552 in wait
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\co
ordinator.py", line 311 in wait_for_stop
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\qu
eue_runner_impl.py", line 293 in _close_on_stop
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 865 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x00000c74 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1279 in _single_operation_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\qu
eue_runner_impl.py", line 257 in _run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 865 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x000015e8 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1279 in _single_operation_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\qu
eue_runner_impl.py", line 257 in _run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 865 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x00000038 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1279 in _single_operation_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\qu
eue_runner_impl.py", line 257 in _run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 865 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x00001ba8 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1279 in _single_operation_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\qu
eue_runner_impl.py", line 257 in _run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 865 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x000017a0 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1279 in _single_operation_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\qu
eue_runner_impl.py", line 257 in _run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 865 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x00001ab8 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1279 in _single_operation_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\qu
eue_runner_impl.py", line 257 in _run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 865 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x00000af4 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1279 in _single_operation_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\qu
eue_runner_impl.py", line 257 in _run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 865 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x00001038 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1279 in _single_operation_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\qu
eue_runner_impl.py", line 257 in _run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 865 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x00000b1c (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 300 in wait
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 552 in wait
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\co
ordinator.py", line 311 in wait_for_stop
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\co
ordinator.py", line 493 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x00001598 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1341 in _run_fn
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1356 in _do_call
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1350 in _do_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1173 in _run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 950 in run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\tr
aining_util.py", line 68 in global_step
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\su
pervisor.py", line 1081 in run_loop
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\co
ordinator.py", line 495 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x000018ac (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1341 in _run_fn
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1356 in _do_call
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1350 in _do_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1173 in _run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 950 in run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\su
pervisor.py", line 1045 in run_loop
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\training\co
ordinator.py", line 495 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x000007d0 (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 296 in wait
  File "C:\Users\AISHA\Anaconda3\lib\queue.py", line 170 in get
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\summary\wri
ter\event_file_writer.py", line 159 in run
  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 917 in _bootstrap_inner

  File "C:\Users\AISHA\Anaconda3\lib\threading.py", line 885 in _bootstrap

Thread 0x00001b7c (most recent call first):
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1429 in _call_tf_sessionrun
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1341 in _run_fn
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1356 in _do_call
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1350 in _do_run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 1173 in _run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\client\sess
ion.py", line 950 in run
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\contrib\slim\pytho
n\slim\learning.py", line 490 in train_step
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\contrib\slim\pytho
n\slim\learning.py", line 775 in train
  File "C:\Users\AISHA\Detection\models\research\object_detection\legacy\trainer
.py", line 416 in train
  File "train.py", line 180 in main
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\util\deprec
ation.py", line 324 in new_func
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\absl\app.py", line 251 in _ru
n_main
  File "C:\Users\AISHA\Anaconda3\lib\site-packages\absl\app.py", line 300 in run

  File "C:\Users\AISHA\Anaconda3\lib\site-packages\tensorflow\python\platform\ap
p.py", line 40 in run
  File "train.py", line 184 in <module>

请帮我吗?

在对faster_rcnn_inception_v2_pets.config文件进行更改之后执行。注意:路径必须使用单个正斜杠(非反斜杠)输入,否则在尝试训练模型时TensorFlow将给出文件路径错误!另外,路径必须用双引号(“)而不是单引号(')。

Line 9. Change num_classes to the number of different objects you want the classifier to detect. For the above basketball, shirt, and shoe detector, it would be num_classes : 3 .

Line 106. Change fine_tune_checkpoint to:
    fine_tune_checkpoint : "C:/tensorflow1/models/research/object_detection/faster_rcnn_inception_v2_coco_2018_01_28/model.ckpt"

Lines 123 and 125. In the train_input_reader section, change input_path and label_map_path to:
    input_path : "C:/tensorflow1/models/research/object_detection/train.record"
    label_map_path: "C:/tensorflow1/models/research/object_detection/training/labelmap.pbtxt"

Line 130. Change num_examples to the number of images you have in the \images\test directory.

Lines 135 and 137. In the eval_input_reader section, change input_path and label_map_path to:
    input_path : "C:/tensorflow1/models/research/object_detection/test.record"
    label_map_path: "C:/tensorflow1/models/research/object_detection/training/labelmap.pbtxt"

0 个答案:

没有答案