Object Detection in turicreate (turicreate-5.0b2) returns empty predictions array

316 Views Asked by At

Hi i am using object detection feature with TuriCreate using 2 class identifiers with 60 images, and i train the data succefully like in the instructions but i'm getting empty predictions when predicting on test data. Installed turicreate-5.0b2 on my MAC OS Mojave 10.14 Beta and XCode version 10.0 Beta 3. This is the code i use:

import turicreate as tc
images = tc.load_images('data/images')
annotations = tc.SFrame('data/imagesannotations.csv')
data = images.join(annotations)
train_data, test_data = data.random_split(0.8)
model = tc.object_detector.create(train_data, max_iterations=10)
predictions = model.predict(test_data)

I get empty prediction output:

Predicting  1/11
Predicting 11/11
>>> predictions
dtype: list
Rows: 11
[[], [], [], [], [], [], [], [], [], [], []]

Please help why i am getting empty prediction. I split the dataset of the images with rate of 0.8 to train and to test on and they are all similar to each other.

2

There are 2 best solutions below

0
On

It is possible that 10 iterations for this dataset is not sufficient to get a model that can confidently predict anything. As a result, all possible predictions are too low-confidence to meet the IOU threshold, and thus the return value is empty lists.

0
On

This might sound unlikely, but I also received empty predictions when using Python 2.7 installed via Homebrew, and exporting the model anyway caused a crash. There was a similar issue here: https://github.com/apple/turicreate/issues/80.

I uninstalled Python and reinstalled 2.7.13 using the installer on https://www.python.org/downloads/mac-osx/ and received predictions. I realized this is months later so hopefully you've resolved your issue by now.