ria-com / nomeroff-net

Nomeroff Net. Automatic numberplate recognition system.
GNU General Public License v3.0
459 stars 159 forks source link

Ошибка выполнения Hello Nomeroff Net #223

Closed saneok15 closed 2 years ago

saneok15 commented 2 years ago

/content/nomeroff-net/nomeroff_net/tools/image_processing.py in crop_image(image, target_box) 575 576 def crop_image(image, target_box): --> 577 x = int(min(target_box[0], target_box[2])) 578 w = int(abs(target_box[2] - target_box[0])) 579 y = int(min(target_box[1], target_box[3]))

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Python 3.7.13 По ходу попыток отладить код нашел ошибку в nomeroff-net/nomeroff_net/pipelines/number_plate_detection_and_reading.py def forward_detection_np(self, inputs: Any, forward_parameters: Dict): images_bboxs,images = unzip(self.number_plate_localization(inputs, forward_parameters)) images_points, images_mline_boxes = unzip(self.number_plate_key_points_detection(unzip([images, images_bboxs]), **forward_parameters)) После того как поменял местами images_bboxs и images заработало

saneok15 commented 2 years ago

Аналогичная ситуация с Hello Nomeroff Net for systems with a small GPU size с аналогичном решением в /nomeroff-net/nomeroff_net/pipelines/number_plate_short_detection_and_reading.py