Error while using tiny-yolo on prodigy-1.8.3

Hi,

I am new to prodigy and trying to use tiny-yolo for a dataset. I am following cookbook of computer vision - prodigy image.test object_dataset tiny-yolo /path/to/images_dir

But this is throwing error -

Exception when serving /get_session_questions
Traceback (most recent call last):
File “cython_src/prodigy/components/feeds.pyx”, line 140, in prodigy.components.feeds.SessionFeed.get_session_stream
File “xxx/lib/python3.7/site-packages/toolz/itertoolz.py”, line 368, in first
return next(iter(seq))
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “xxx/lib/python3.7/site-packages/waitress/channel.py”, line 336, in service
task.service()
File “xxx/lib/python3.7/site-packages/waitress/task.py”, line 175, in service
self.execute()
File “xxx/lib/python3.7/site-packages/waitress/task.py”, line 452, in execute
app_iter = self.channel.server.application(env, start_response)
File “xxx/lib/python3.7/site-packages/hug/api.py”, line 451, in api_auto_instantiate
return module.hug_wsgi(*args, **kwargs)
File “xxx/lib/python3.7/site-packages/falcon/api.py”, line 244, in call
responder(req, resp, **params)
File “xxx/lib/python3.7/site-packages/hug/interface.py”, line 789, in call
raise exception
File “xxx/lib/python3.7/site-packages/hug/interface.py”, line 762, in call
self.render_content(self.call_function(input_parameters), context, request, response, **kwargs)
File “xxx/lib/python3.7/site-packages/hug/interface.py”, line 698, in call_function
return self.interface(**parameters)
File “xxx/lib/python3.7/site-packages/hug/interface.py”, line 100, in call
return __hug_internal_self._function(*args, **kwargs)
File “xxx/lib/python3.7/site-packages/prodigy/_api/hug_app.py”, line 228, in get_session_questions
tasks = controller.get_questions(session_id=session_id)
File “cython_src/prodigy/core.pyx”, line 130, in prodigy.core.Controller.get_questions
File “cython_src/prodigy/components/feeds.pyx”, line 58, in prodigy.components.feeds.SharedFeed.get_questions
File “cython_src/prodigy/components/feeds.pyx”, line 63, in prodigy.components.feeds.SharedFeed.get_next_batch
File “cython_src/prodigy/components/feeds.pyx”, line 147, in prodigy.components.feeds.SessionFeed.get_session_stream
ValueError: Error while validating stream: no first example. This likely means that your stream is empty.

What is wrong here?
My directory contains image samples only as mentioned in cookbook. Also, how to generate stream for images?

Thanks!

Hi! The command looks correct :slightly_smiling_face: Based on the error, it seems like for some reason, the model hasn’t sent anything out for annotation and the resulting stream contains no examples. One explanation of this can be that there are just no (valid) image files in the source directory – but that doesn’t seem to be the case here.

It’s also theoretically possible that the model predicted no bounding boxes for any of the images in your samples for any of the available categories. It’s unlikely, but possible. Finally, there could also be a bug or some other problem in the experimental Cython implementation of lightnet – so you might find that it’s actually much easier to just swap it out for a newer implementation using PyTorch etc. (When we first built this test recipe, there weren’t really any easy-to-use Python options – but that has changed since!)

When you run the recipe with PRODIGY_LOGGING=basic enabled, what does the log say? Is it skipping anything, or do you see other statements that look suspicious?