OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.49k stars 2.18k forks source link

imageai.Detection.Custom on COLAB failure #700

Open marbortoli opened 2 years ago

marbortoli commented 2 years ago

I'm trying my own dataset on the custom object detection tutorial in google COLAB and I get the error below. Someone else?

/usr/local/lib/python3.7/dist-packages/tensorflow/python/data/ops/dataset_ops.py:4212: UserWarning: Even though the tf.config.experimental_run_functions_eagerly option is set, this option does not apply to tf.data functions. To force eager execution of tf.data functions, please use tf.data.experimental.enable_debug_mode(). "Even though the tf.config.experimental_run_functions_eagerly "

script: from imageai.Detection.Custom import CustomObjectDetection

detector = CustomObjectDetection() detector.setModelTypeAsYOLOv3() detector.setModelPath('scada_one/models/detection_model-ex-034--loss-0017.824.h5') detector.setJsonPath('scada_one/json/detection_config.json') detector.loadModel() detections, extracted_objects_array = detector.detectObjectsFromImage(input_image='LA011.jpeg', output_image_path='obj_detected.jpg', extract_detected_objects=True)

for detection, object_path in zip(detections, extracted_objects_array): print(object_path) print(detection['percentage_probability'], " : ", detection['box_points']) print('-----')

mathvansoest commented 2 years ago

I'm getting the same message, though the code seems to be running fine. Have you resolved it yet?

IntelligenzaArtificiale commented 1 year ago

imageai in colab dosent work .....