From c5d24e53b605354f9f328e68cf1451e0edfc8175 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Thu, 10 Aug 2017 18:02:13 +0530 Subject: [PATCH] Fix section fisher default size when descriptor fails --- aesthetics/fisher/fisher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aesthetics/fisher/fisher.py b/aesthetics/fisher/fisher.py index 785f52a..715b058 100644 --- a/aesthetics/fisher/fisher.py +++ b/aesthetics/fisher/fisher.py @@ -85,7 +85,7 @@ def fisher_vector_of_img_array(self, img): def section_fisher(img_section, full_fisher): sec_fisher = self.fisher_vector_of_image_section(img_section) - if sec_fisher is None: + if sec_fisher.shape == (0,): sec_fisher = np.zeros(full_fisher.shape) return sec_fisher