Creating Tensorflow Dataset for Object Recognition in Keras


I was wondering if someone could aid me in solving this problem. I have been following this tutorial, which uses the COCO dataset from tfds.

I am interested in using a different dataset, but I am having trouble adapting the code.

My dataset consists of a number of images, with corresponding bounding box annotations in a .csv. It can be summarized as this: [filename, xmin, ymin, xmax, ymax, class].

The code in this tutorial uses (to my understanding) a tensor dataset with the format [image_array, xmin, ymin, xmax, ymax, class].

How can I load this data in this format? I have been having a great deal of trouble finding any resources. Any help is greatly appreciated! I will mention how I have been approaching this below.

Summary of things applied:

Essentially, I have been able to load everything into a pandas dataframe with 6 columns, consisting of [filename, xmin, ymin, xmax, ymax, class]. However, I feel this to be inefficient, and I cannot get the last step (conversion to a tensor).

I try: d =

and get: ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray).

submitted by /u/Puzzled_Supports
[visit reddit] [comments]

Leave a Reply

Your email address will not be published. Required fields are marked *