bbox工具无法为Darkflow / yolo神经网络生成xml文件

时间:2018-12-11 20:28:55

标签: python tensorflow

因此,当使用Darkflow和我自己的100个图像数据集进行训练时,我遇到了一个挑战:我的系统似乎没有任何东西在流动:

Vinces-MBP:darkflow vinceparis$ python3.6 flow --model cfg/yolo-new.cfg     --labels one_label.txt      --train --trainer adam     --dataset 
"/Users/vinceparis/xfz/100pics/Images/002"     --annotation 
"/Users/vinceparis/xfz/BBox-Label-Tool/AnnotationsXML/002"
Parsing cfg/yolo-new.cfg
Loading None ...
Finished in 0.00015306472778320312s
Building net ...
Source | Train? | Layer description                | Output size
-------+--------+----------------------------------+---------------
       |        | input                            | (?, 608, 608, 3)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 608, 608, 32)
Load  |  Yep!  | maxp 2x2p0_2                     | (?, 304, 304, 32)     
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 304, 304, 64)
Load  |  Yep!  | maxp 2x2p0_2                     | (?, 152, 152, 64)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 152, 152, 128)
Init  |  Yep!  | conv 1x1p0_1  +bnorm  leaky      | (?, 152, 152, 64)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 152, 152, 128)
Load  |  Yep!  | maxp 2x2p0_2                     | (?, 76, 76, 128)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 76, 76, 256)
Init  |  Yep!  | conv 1x1p0_1  +bnorm  leaky      | (?, 76, 76, 128)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 76, 76, 256)
Load  |  Yep!  | maxp 2x2p0_2                     | (?, 38, 38, 256)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 38, 38, 512)
Init  |  Yep!  | conv 1x1p0_1  +bnorm  leaky      | (?, 38, 38, 256)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 38, 38, 512)
Init  |  Yep!  | conv 1x1p0_1  +bnorm  leaky      | (?, 38, 38, 256)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 38, 38, 512)
Load  |  Yep!  | maxp 2x2p0_2                     | (?, 19, 19, 512)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 19, 19, 1024)
Init  |  Yep!  | conv 1x1p0_1  +bnorm  leaky      | (?, 19, 19, 512)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 19, 19, 1024)
Init  |  Yep!  | conv 1x1p0_1  +bnorm  leaky      | (?, 19, 19, 512)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 19, 19, 1024)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 19, 19, 1024)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 19, 19, 1024)
Load  |  Yep!  | concat [16]                      | (?, 38, 38, 512)
Init  |  Yep!  | conv 1x1p0_1  +bnorm  leaky      | (?, 38, 38, 64)
Load  |  Yep!  | local flatten 2x2                | (?, 19, 19, 256)
Load  |  Yep!  | concat [27, 24]                  | (?, 19, 19, 1280)
Init  |  Yep!  | conv 3x3p1_1  +bnorm  leaky      | (?, 19, 19, 1024)
Init  |  Yep!  | conv 1x1p0_1    linear           | (?, 19, 19, 30)
-------+--------+----------------------------------+---------------
        Running entirely on CPU
    cfg/yolo-new.cfg loss hyper-parameters:
    H       = 19
    W       = 19
    box     = 5
    classes = 2
    scales  = [1.0, 5.0, 1.0, 1.0]
Building cfg/yolo-new.cfg loss
Building cfg/yolo-new.cfg train op
2018-12-09 23:53:49.842284: I 
tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports 
instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Finished in 15.812134027481079s
Enter training ...
cfg/yolo-new.cfg parsing /Users/vinceparis/xfz/BBox-Label- 
Tool/AnnotationsXML/002
Parsing for ['map_text', 'map_tet2'] 
[====================>]100%  image0.xml
Statistics:
Dataset size: 1
Dataset of 1 instance(s)
image0.jpg__preview copy 88.jpg
Traceback (most recent call last):
    File "flow", line 6, in <module>
    cliHandler(sys.argv)
File "/Users/vinceparis/xfz/darkflow/darkflow/cli.py", line 33, in 
cliHandler
    print('Enter training ...'); tfnet.train()
File "/Users/vinceparis/xfz/darkflow/darkflow/net/flow.py", line 39, in train
    for i, (x_batch, datum) in enumerate(batches):
  File "/Users/vinceparis/xfz/darkflow/darkflow/net/yolo/data.py", line 114, in shuffle
    inp, new_feed = self._batch(train_instance)
  File "/Users/vinceparis/xfz/darkflow/darkflow/net/yolov2/data.py", line 28, in _batch
    img = self.preprocess(path, allobj)
  File "/Users/vinceparis/xfz/darkflow/darkflow/net/yolo/predict.py", line 62, in preprocess
    result = imcv2_affine_trans(im)
  File "/Users/vinceparis/xfz/darkflow/darkflow/utils/im_transform.py", line 
  20, in imcv2_affine_trans
    h, w, c = im.shape
    AttributeError: 'NoneType' object has no attribute 'shape'****

我检查了我的BBox-Label-Tool,确认了使用该工具时仅生成了一个xml文件!通过注释过程时,如何获取BBox-Label工具生成多个XML?

0 个答案:

没有答案