Skip to content

Commit

Permalink
debug on runner
Browse files Browse the repository at this point in the history
  • Loading branch information
iulusoy committed Oct 5, 2023
1 parent bb63bbf commit da031d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ammico/objects_cvlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def detect_objects_cvlib(self, image_path):
image_path: The path to the local file.
"""
img = cv2.imread(image_path)

print("read image {}".format(img))
_, label, _ = cv.detect_common_objects(img)
objects = objects_from_cvlib(label)
return objects
Expand All @@ -70,7 +70,9 @@ def analyse_image(self, subdict):
Args:
subdict: The dictionary for an image expression instance.
"""
print("file is {}".format(subdict["filename"]))
objects = self.analyse_image_from_file(subdict["filename"])
print(objects)
for key in objects:
subdict[key] = objects[key]

Expand Down
1 change: 1 addition & 0 deletions ammico/test/test_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def test_objects_from_cvlib(default_objects):

def test_analyse_image_cvlib(get_path):
mydict = {"filename": get_path + TEST_IMAGE_1}
print(mydict)
ob_cvlib.ObjectCVLib().analyse_image(mydict)

with open(get_path + JSON_1, "r") as file:
Expand Down

0 comments on commit da031d1

Please sign in to comment.