回答編集履歴
1
追記
answer
CHANGED
@@ -9,4 +9,20 @@
|
|
9
9
|
image_ids = open('VOCDevkit/VOC%s/ImageSets/Main/%s.txt'%(year, image_set)).read().strip().split()
|
10
10
|
```
|
11
11
|
|
12
|
-
/VOCの
|
12
|
+
/VOCの後のコードが違っています。ここがエラーの原因でしょう。
|
13
|
+
|
14
|
+
---
|
15
|
+
|
16
|
+
【追加の質問への回答】
|
17
|
+
質問のコードでは下記となっていますが、
|
18
|
+
```Python
|
19
|
+
def convert_annotation(year, image_id, list_file):
|
20
|
+
in_file = open('VOCdevkit/VOC2007/Annotations/%s.xml'%(year, image_id))
|
21
|
+
```
|
22
|
+
|
23
|
+
[オリジナル](https://github.com/sleepless-se/keras-yolo3/blob/master/voc_annotation.py)では下記です。
|
24
|
+
```Python
|
25
|
+
def convert_annotation(year, image_id, list_file):
|
26
|
+
in_file = open('VOCDevkit/VOC%s/Annotations/%s.xml'%(year, image_id.replace(".jpg","")))
|
27
|
+
```
|
28
|
+
(year,の後のコードが違っています。ここがエラーの原因でしょう。
|