# Train a Subset of the Dataset. Can I use the SAM model for object detection?

**URL:** <https://discuss.roboflow.com/t/train-a-subset-of-the-dataset-can-i-use-the-sam-model-for-object-detection/1997>\
**Category:** 🤝  Community Help\
**Tags:** split-after-upload, feature-request\
**Created:** [April 22, 2023, 6:35pm UTC](https://discuss.roboflow.com/t/train-a-subset-of-the-dataset-can-i-use-the-sam-model-for-object-detection/1997 "2023-04-22T18:35:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snehit\_vaddi](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/snehit_vaddi/32/1632_2.png) [@snehit\_vaddi](https://discuss.roboflow.com/u/snehit_vaddi)\
**Post date:** [April 22, 2023, 6:35pm UTC](https://discuss.roboflow.com/t/train-a-subset-of-the-dataset-can-i-use-the-sam-model-for-object-detection/1997/1 "2023-04-22T18:35:36Z")

</div>

Hello!

1. I’m working on detecting potatoes and came across a partially labeled dataset on Roboflow Universe.

2. I am using the latest SAM to label data, and I have labeled some images. Now I want to train the Yolo model with just those newly labeled images instead of all the images.

3. I see no option to filter out images when generating a new dataset. How do I select only a few images to generate a new dataset?

4. Apart from this, I want to know if I can use this segmentation labeling for object detection using Yolov8.
