@@ -31,17 +31,20 @@ def test_parse_sharks_createml(self):
31
31
assert len (imgReference ["annotations" ]) == 5
32
32
33
33
def test_parse_sharks_yolov9 (self ):
34
- sharksfolder = f"{ thisdir } /../datasets/sharks-tiny-yolov9"
35
- parsed = folderparser .parsefolder (sharksfolder )
36
- testImagePath = "/train/images/sharks_mp4-20_jpg.rf.5359121123e86e016401ea2731e47949.jpg"
37
- testImage = [i for i in parsed ["images" ] if i ["file" ] == testImagePath ][0 ]
38
- expectAnnotationFile = "/train/labels/sharks_mp4-20_jpg.rf.5359121123e86e016401ea2731e47949.txt"
39
- assert testImage ["annotationfile" ]["file" ] == expectAnnotationFile
40
- assert testImage ["annotationfile" ]["labelmap" ] == {0 : "fish" , 1 : "primary" , 2 : "shark" }
34
+ def test (sharksfolder ):
35
+ parsed = folderparser .parsefolder (sharksfolder )
36
+ testImagePath = "/train/images/sharks_mp4-20_jpg.rf.5359121123e86e016401ea2731e47949.jpg"
37
+ testImage = [i for i in parsed ["images" ] if i ["file" ] == testImagePath ][0 ]
38
+ expectAnnotationFile = "/train/labels/sharks_mp4-20_jpg.rf.5359121123e86e016401ea2731e47949.txt"
39
+ assert testImage ["annotationfile" ]["file" ] == expectAnnotationFile
40
+ assert testImage ["annotationfile" ]["labelmap" ] == {0 : "fish" , 1 : "primary" , 2 : "shark" }
41
+
42
+ test (f"{ thisdir } /../datasets/sharks-tiny-yolov9" )
43
+ test (f"{ thisdir } /../datasets/sharks-tiny-yolov9/" ) # this was a bug once, can you believe it?
41
44
42
45
def test_parse_mosquitos_csv (self ):
43
- sharksfolder = f"{ thisdir } /../datasets/mosquitos"
44
- parsed = folderparser .parsefolder (sharksfolder )
46
+ folder = f"{ thisdir } /../datasets/mosquitos"
47
+ parsed = folderparser .parsefolder (folder )
45
48
testImagePath = "/train_10308.jpeg"
46
49
testImage = [i for i in parsed ["images" ] if i ["file" ] == testImagePath ][0 ]
47
50
assert testImage ["annotationfile" ]["name" ] == "annotation.csv"
0 commit comments