Open mp168 opened 5 years ago
As I answered in the previous question this depends on you dataset, probably it is not good for this net.
The only way to solve it is to add the missing key in each xml file
<?xml version="1.0"?>
-
-
-
-
-
-
this is my xml. and i only recognite one class,I can't find my datasets where is wrong??!!
Did you open it with a text editor (notepad if Windows or kate on linux) to paste the content here?
If not, do it and paste the content here
Again, the keys are missing. I need it in the form
<key1>
<key2>value</key2>
etc.
</key1>
<annotation>
<folder>VOC2007</folder>
<filename>000007.jpg</filename>
<source>
<database>The VOC2007 Database</database>
<annotation>PASCAL VOC2007</annotation>
<image>flickr</image>
</source>
<owner>
<flickrid>Fried Camels</flickrid>
<name>Jinky the Fruit Bat</name>
</owner>
<size>
<width>704</width>
<height>576</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>smog</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>176</xmin>
<ymin>260</ymin>
<xmax>209</xmax>
<ymax>293</ymax>
</bndbox>
</object>
<object>
<name>smog</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>221</xmin>
<ymin>260</ymin>
<xmax>250</xmax>
<ymax>296</ymax>
</bndbox>
</object>
</annotation>
The xml file is correct, so it should work
Make sure you placed the files in the right location (see https://github.com/dBeker/Faster-RCNN-TensorFlow-Python3/issues/82)
when i run the train.py,TypeError: argument of type 'NoneType' is not iterable
File "D:/mp_code/smog_faster_rcnn/train.py", line 154, in train blobs = self.data_layer.forward() File "D:\mp_code\smog_faster_rcnn\lib\layer_utils\roi_data_layer.py", line 75, in forward blobs = self._get_next_minibatch() File "D:\mp_code\smog_faster_rcnn\lib\layer_utils\roi_data_layer.py", line 71, in _get_next_minibatch return get_minibatch(minibatch_db, self._num_classes) File "D:\mp_code\smog_faster_rcnn\lib\utils\minibatch.py", line 36, in get_minibatch im_blob, im_scales = _get_image_blob(roidb, random_scale_inds) File "D:\mp_code\smog_faster_rcnn\lib\utils\minibatch.py", line 70, in _get_image_blob im = cv2.imread(roidb[i]['image']) KeyError: 'image'
<annotation> <folder>VOC2007</folder> <filename>000007.jpg</filename> <source> <database>The VOC2007 Database</database> <annotation>PASCAL VOC2007</annotation> <image>flickr</image> </source> <owner> <flickrid>Fried Camels</flickrid> <name>Jinky the Fruit Bat</name> </owner> <size> <width>704</width> <height>576</height> <depth>3</depth> </size> <segmented>0</segmented> <object> <name>smog</name> <pose>Unspecified</pose> <truncated>0</truncated> <difficult>0</difficult> <bndbox> <xmin>176</xmin> <ymin>260</ymin> <xmax>209</xmax> <ymax>293</ymax> </bndbox> </object> <object> <name>smog</name> <pose>Unspecified</pose> <truncated>0</truncated> <difficult>0</difficult> <bndbox> <xmin>221</xmin> <ymin>260</ymin> <xmax>250</xmax> <ymax>296</ymax> </bndbox> </object> </annotation>
File "D:/mp_code/smog_faster_rcnn/train.py", line 154, in train blobs = self.data_layer.forward() File "D:\mp_code\smog_faster_rcnn\lib\layer_utils\roi_data_layer.py", line 75, in forward blobs = self._get_next_minibatch() File "D:\mp_code\smog_faster_rcnn\lib\layer_utils\roi_data_layer.py", line 71, in _get_next_minibatch return get_minibatch(minibatch_db, self._num_classes) File "D:\mp_code\smog_faster_rcnn\lib\utils\minibatch.py", line 36, in get_minibatch im_blob, im_scales = _get_image_blob(roidb, random_scale_inds) File "D:\mp_code\smog_faster_rcnn\lib\utils\minibatch.py", line 70, in _get_image_blob im = cv2.imread(roidb[i]['image']) KeyError: 'image'
I had seen the same questions, but i still can't solve it, I try to my data as yours, can you help me?
Has your problem been solved? I encountered this problem too.
I had seen the same questions, but i still can't solve it, I try to my data as yours, can you help me?