# Labels generated with the API have little information and roboflow doesn't recognize annotations

**URL:** <https://discuss.roboflow.com/t/labels-generated-with-the-api-have-little-information-and-roboflow-doesnt-recognize-annotations/2453>\
**Category:** 🤝  Community Help\
**Tags:** formats, export\
**Created:** [June 18, 2023, 1:36pm UTC](https://discuss.roboflow.com/t/labels-generated-with-the-api-have-little-information-and-roboflow-doesnt-recognize-annotations/2453 "2023-06-18T13:36:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![fernando\_paradiso](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/fernando_paradiso/32/2173_2.png) [@fernando\_paradiso](https://discuss.roboflow.com/u/fernando_paradiso)\
**Post date:** [June 18, 2023, 1:36pm UTC](https://discuss.roboflow.com/t/labels-generated-with-the-api-have-little-information-and-roboflow-doesnt-recognize-annotations/2453/1 "2023-06-18T13:36:48Z")

</div>

1. Project type: Object detection.
2. Windows 10, Chrome browser.

My goal is to do object detection and I have a dataset of 1000 photos. In order not to create bounding boxes manually for all the photos, I made 100 and followed this tutorial:

> **[Annotate API](https://docs.roboflow.com/annotate/annotate-api)**
>
> How you can leverage the Roboflow inference API to automatically annotate your images

Everything went right except that the labels that were created have very little information inside and obviously, when I dragged the images and labels, the bounding boxes are not there. The format of the final json files is this for example:  
{  
“predictions”: ,  
“image”: {  
“width”: “2736”,  
“height”: “1824”  
}  
}  
There is only photo resolution. The roboflow project is this:  
[plum quality classification Object Detection Dataset and Pre-Trained Model by myworkspace](https://universe.roboflow.com/myworkspace-n7q3r/plum-quality-classification). I have done some pre-processing (resize, flip and augmentation (x3)).  
how come there is nothing else? it doesn’t work with the label assist tool either.  
thank you all

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [June 22, 2023, 6:49am UTC](https://discuss.roboflow.com/t/labels-generated-with-the-api-have-little-information-and-roboflow-doesnt-recognize-annotations/2453/2 "2023-06-22T06:49:41Z")

</div>

Hi @fernando_paradiso

Sorry to hear you’re having issues.

> [@fernando\_paradiso](#):
>
> {  
> “predictions”: ,  
> “image”: {  
> “width”: “2736”,  
> “height”: “1824”  
> }  
> }

Is this a annotation file or is this a inference result? It looks like a result from Roboflow’s hosted inference API which the Annotate API uses to annotate new images using a previously trained model.

Do you have a trained model ready?

Also, if you wouldn’t mind, could you share the code snippet you’re using that produced that result? (Remember to remove your private Roboflow API key if applicable)

---

<div class="post-metadata">

**Author:** ![fernando\_paradiso](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/fernando_paradiso/32/2173_2.png) [@fernando\_paradiso](https://discuss.roboflow.com/u/fernando_paradiso)\
**Post date:** [June 23, 2023, 5:08pm UTC](https://discuss.roboflow.com/t/labels-generated-with-the-api-have-little-information-and-roboflow-doesnt-recognize-annotations/2453/3 "2023-06-23T17:08:56Z")

</div>

Hi @leo and thanks for asking. Yes, I followed Peter’s tutorial from Roboflow which is in the “Annotate API” link I entered. I also train the model to Roboflow, but when creating the tags, if I drag the images and labels at the same time to the “upload” section of Roboflow, I only see the photos without any tags generated. I also tried using the Label Assist and selected my project and template, but it doesn’t automatically generate the Bounding Boxes like in Peter’s video. The code I used is this:

> git clone [git@github.com](mailto:git@github.com):roboflow/auto-annotate.git  
> cd auto-annotate  
> python3 -m venv venv  
> source venv/bin/activate  
> pip install -e .  
> export ROBOFLOW\_API\_KEY= …  
> python -m a2.annotate   
> –source\_image\_directory …   
> –target\_annotation\_directory …   
> –roboflow\_project\_id …   
> –roboflow\_project\_version …

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [June 25, 2023, 3:19am UTC](https://discuss.roboflow.com/t/labels-generated-with-the-api-have-little-information-and-roboflow-doesnt-recognize-annotations/2453/4 "2023-06-25T03:19:25Z")

</div>

Hi @fernando_paradiso

It sounds like your model might not be making predictions confidently quite yet.

Have you tried messing around with the confidence on Label Assist? Did that help at all?  
 ![chrome_gDvnyyQtfT](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/0/0e3f6303b1076423ed42c3db12f6def813152b55.png)

Can you try inferring on your images normally through Roboflow? (Either through the Deploy tab or the Deploy Your Model section under each trained version) Do any of your expected predictions show up there?

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/b/b123a38204cb13891bac8763ae92b6d82bac2b3e.jpeg)

---

<div class="post-metadata">

**Author:** ![fernando\_paradiso](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/fernando_paradiso/32/2173_2.png) [@fernando\_paradiso](https://discuss.roboflow.com/u/fernando_paradiso)\
**Post date:** [June 28, 2023, 8:22am UTC](https://discuss.roboflow.com/t/labels-generated-with-the-api-have-little-information-and-roboflow-doesnt-recognize-annotations/2453/5 "2023-06-28T08:22:56Z")

</div>

Hi @leo. I have tried to play with the confidence but doesn’t work. It doesn’t detect anything. I have tried also inferring on my image but I haven’t a prediction. In my case, all prune are bad and i have only one class.

 ![inference.PNG](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/e/e7d8a18922a63e4c8cb6fbc46bbcd456ff671ba3.jpeg)

---

<div class="post-metadata">

**Author:** ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)\
**Post date:** [June 29, 2023, 5:21am UTC](https://discuss.roboflow.com/t/labels-generated-with-the-api-have-little-information-and-roboflow-doesnt-recognize-annotations/2453/6 "2023-06-29T05:21:08Z")

</div>

Hello @fernando_paradiso

I think, in that case, you don’t have enough data. I tried your model on Universe with a sample from your test dataset and it did show up when I was down to 1% confidence. This is the reason your label assist and inference weren’t working.

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/4/413404861b86af9cb948bcd01cc6e5e7bca944b0.jpeg)

Also, looking at your dataset, you might be better off with an image classification model. It seems that your images always only have one plum and you have one label you want to assign to each image. It might be worth looking through [this blog post](https://blog.roboflow.com/object-detection-vs-image-classification-vs-keypoint-detection/) to see if classification is the way to go for you.

Otherwise, I think you need more images to train with. One way to easily create more training data is to add more augmentations. I saw you have horizontal and vertical flip, which is a good start, but adding more types of augmentations to add variety to your dataset will likely help your model perform better and avoid [overfitting](https://blog.roboflow.com/overfitting-machine-learning-computer-vision/).

Hope this helps.

---

<div class="post-metadata">

**Author:** ![fernando\_paradiso](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/fernando_paradiso/32/2173_2.png) [@fernando\_paradiso](https://discuss.roboflow.com/u/fernando_paradiso)\
**Post date:** [July 1, 2023, 2:20pm UTC](https://discuss.roboflow.com/t/labels-generated-with-the-api-have-little-information-and-roboflow-doesnt-recognize-annotations/2453/7 "2023-07-01T14:20:03Z")

</div>

So, the main reason is that there aren’t enough photos and therefore not enough bounding boxes for it to leverage Roboflow’s inference API to automatically annotate images. I know image classification is more appropriate but I am using this approach because I need to compare in a project at university how object detection with yolo and image classification works with other neural networks.

OK, thank you and consider the issue resolved.
