Answers.Body: <p>It looks like the problem is that it is also predicting a bounding box around the whole document. Overlapping boxes of the same class will confuse the model training process (I believe only the biggest one will get used).</p>
  <p>You may want to try some different prompts in your ontology to see if you can get it to label things better.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-12T08:51:22.557Z
Answers.Text: I change the code to remove the whole doc BB by removing the biggest bounding box, it still return empty
Answers.UserDisplayName: Elia Weiss
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-12T08:51:57.407Z
Answers.Text: also, it should have return the whole doc BB, not empty
Answers.UserDisplayName: Elia Weiss
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-13T12:29:22.390Z
Answers.Text: Looking at the training logs in the Colab it looks like not nearly enough images in the training set (8; try with at least 100) and for such a small dataset you will want to train for many more epochs (it only got to 2% mAP after 50).
Answers.UserDisplayName: Brad Dwyer
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-13T12:57:57.790Z
Answers.Text: I tried with more images (87), I would expect it to at least return something, note that I use the same dataset to train another model with autodistill and GroundedSAM and it was working ok
Answers.UserDisplayName: Elia Weiss
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-15T12:49:28.970Z
Answers.Text: Is this all in the same Colab environment? Maybe try resetting it and starting from scratch
Answers.UserDisplayName: Brad Dwyer
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-16T20:07:39.777Z
Answers.Text: Yes, I tried to reset it more than a few times
Answers.UserDisplayName: Elia Weiss
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-06-11T13:38:50.137Z
Answers.LastActivityDate: 2023-06-11T13:48:55.563Z
Answers.LastEditDate: 2023-06-11T13:48:55.563Z
Answers.UserDisplayName: Brad Dwyer
Body: <p>I'm trying to create a distilled model of SAM
  <a href="https://colab.research.google.com/drive/1PKc5x1XjxOPP-2msFp6uMSULvnm9dorw?usp=sharing" rel="nofollow noreferrer">https://colab.research.google.com/drive/1PKc5x1XjxOPP-2msFp6uMSULvnm9dorw?usp=sharing</a></p>
  <p>I'm able to label the data and train, but the predict doesn't find anything</p>
  <p>Please help</p>
  <p>I tried:</p>
  <ul>
  <li>remove the whole doc BB by removing the biggest bounding box, it still return empty</li>
  <li>Train on JPG/PNG, same result</li>
  </ul>
  <p>NOTE that I am able to train with autodistill/GroundedSAM on the same dataset (I use it to find the document boundaries for auto cropping)</p>
  <p>The purpose is to find bounded area in a document</p>
  <p>SAM can do it well but it's heavy and slow, therefore I'm trying to create a Autodistill YOLOv8 that will find the bounded area in a document</p>
  <p>I'm not sure that YOLOv8, because the concept of document is foreign to YOLOv8, is there a better way to create a SAM distilled model?</p>
  <p>I can see that the labels are assign correct:
  <a href="https://i.sstatic.net/l0IbC.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/l0IbC.jpg" alt="enter image description here" /></a></p>
  
Tags: <yolo>
Title: Autodistill: Train YOLOv8 with ZERO Annotations
UserDisplayName: Elia Weiss
ThreadText: # Autodistill: Train YOLOv8 with ZERO Annotations
  
  (Asked by: username_0 on 2023-06-09)
  
  I'm trying to create a distilled model of SAM
  <https://colab.research.google.com/drive/1PKc5x1XjxOPP-2msFp6uMSULvnm9dorw?usp=sharing>
  
  I'm able to label the data and train, but the predict doesn't find anything
  
  Please help
  
  I tried:
  
  * remove the whole doc BB by removing the biggest bounding box, it still return empty
  * Train on JPG/PNG, same result
  
  NOTE that I am able to train with autodistill/GroundedSAM on the same dataset (I use it to find the document boundaries for auto cropping)
  
  The purpose is to find bounded area in a document
  
  SAM can do it well but it's heavy and slow, therefore I'm trying to create a Autodistill YOLOv8 that will find the bounded area in a document
  
  I'm not sure that YOLOv8, because the concept of document is foreign to YOLOv8, is there a better way to create a SAM distilled model?
  
  I can see that the labels are assign correct:
  [![enter image description here](https://i.sstatic.net/l0IbC.jpg)](https://i.sstatic.net/l0IbC.jpg)
  
  **Tags:** yolo
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-06-11. Score: 1
  
  It looks like the problem is that it is also predicting a bounding box around the whole document. Overlapping boxes of the same class will confuse the model training process (I believe only the biggest one will get used).
  
  You may want to try some different prompts in your ontology to see if you can get it to label things better.
  
  > **Comments:**
  > **username_0**: I change the code to remove the whole doc BB by removing the biggest bounding box, it still return empty  
  > **username_0**: also, it should have return the whole doc BB, not empty  
  > **username_1**: Looking at the training logs in the Colab it looks like not nearly enough images in the training set (8; try with at least 100) and for such a small dataset you will want to train for many more epochs (it only got to 2% mAP after 50).  
  > **username_0**: I tried with more images (87), I would expect it to at least return something, note that I use the same dataset to train another model with autodistill and GroundedSAM and it was working ok  
  > **username_1**: Is this all in the same Colab environment? Maybe try resetting it and starting from scratch  
  > **username_0**: Yes, I tried to reset it more than a few times  
  
  ---
  
  