@@ -31,17 +31,20 @@ def test_parse_sharks_createml(self):
3131 assert len (imgReference ["annotations" ]) == 5
3232
3333 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?
4144
4245 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 )
4548 testImagePath = "/train_10308.jpeg"
4649 testImage = [i for i in parsed ["images" ] if i ["file" ] == testImagePath ][0 ]
4750 assert testImage ["annotationfile" ]["name" ] == "annotation.csv"
0 commit comments