# Generated datasets producing black blank images

**URL:** <https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618>\
**Category:** 🤝  Community Help\
**Created:** [July 10, 2023, 8:01am UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618 "2023-07-10T08:01:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![rggg](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rggg](https://discuss.roboflow.com/u/rggg)\
**Post date:** [July 10, 2023, 8:01am UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/1 "2023-07-10T08:01:26Z")

</div>

When I tried to generate new versions based on my dataset, the images got blanked. Images in the dataset are fine, but in versions are not.

 ![Screenshot 2023-07-10 at 18.00.36](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/3/3eea5c54b69f6f25a3ba97e3e50dac71e29dbcb0.jpeg)

Can anyone tell me how to fix the issue, please? I have also tried reduce the amount of images on the same dataset but still don’t work.

- **Project Type: Object detection**
- \*\*Operating System & Browser: Google Chrome & Safari on macOS \*\*
- **Project Link: [frac1 Object Detection Dataset by vri2306](https://universe.roboflow.com/vri2306/frac1)**

---

<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:** [July 11, 2023, 10:02pm UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/2 "2023-07-11T22:02:42Z")

</div>

Hi @rggg

That’s an interesting issue. Is the screen correct in stating that you applied no augmentations whatsoever?

---

<div class="post-metadata">

**Author:** ![rggg](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rggg](https://discuss.roboflow.com/u/rggg)\
**Post date:** [July 12, 2023, 4:54am UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/3 "2023-07-12T04:54:33Z")

</div>

> [@leo](#):
>
> That’s an interesting issue. Is the screen correct in stating that you applied no augmentations whatsoever?

yes, no augmentations applied

---

<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:** [July 13, 2023, 4:54am UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/4 "2023-07-13T04:54:19Z")

</div>

Hi @rggg

Do the images from your dataset originate from a specific source? Potentially with an irregular image encoding?

---

<div class="post-metadata">

**Author:** ![rggg](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rggg](https://discuss.roboflow.com/u/rggg)\
**Post date:** [July 13, 2023, 7:37am UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/5 "2023-07-13T07:37:18Z")

</div>

not sure what is a specific source, but it does not from roboflow.

image format is png, and for label format, i have tried xml and yolov5, but both failed the same.

---

<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:** [July 14, 2023, 2:12am UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/6 "2023-07-14T02:12:44Z")

</div>

Hi @rggg

What I was getting at is if you were exporting the images from a certain software that might have a unique image encoding. Could you upload a sample image that you are having issues with?

---

<div class="post-metadata">

**Author:** ![rggg](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rggg](https://discuss.roboflow.com/u/rggg)\
**Post date:** [July 14, 2023, 5:30am UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/7 "2023-07-14T05:30:47Z")

</div>

![0003_0662359226_01_WRI-R1_M011](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/b/ba2726d67288000c6a8ee1833b06b1ec0b86bb98.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:** [July 15, 2023, 1:24am UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/8 "2023-07-15T01:24:21Z")

</div>

Hi @rggg

There seems to be a bug in Roboflow that has trouble with images that are grayscale encoded, which your images are.

I’ve filed a bug report, and in the meantime, you can convert images into RGB color space using this notebook: [convert-color-space.ipynb · GitHub](https://gist.github.com/stellasphere/e929aaa893d189a935e521672db5363b)

---

<div class="post-metadata">

**Author:** ![rggg](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rggg](https://discuss.roboflow.com/u/rggg)\
**Post date:** [July 15, 2023, 2:05am UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/9 "2023-07-15T02:05:50Z")

</div>

however, it worked on my another dataset which is also in grayscale. here is the example of the worked dateset

 ![2_jpg.rf.aa35f3fed78f07f64d61f6bdc776433f](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/c/c81e2c23920b084ae212c3518152d8d7e05e9450.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:** [July 15, 2023, 2:45am UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/10 "2023-07-15T02:45:03Z")

</div>

Hi @rggg

What I was reffering to is not necessarily about the actual image color, but the encoding, the method and format of the image data. The two images you sent uses different encodings on the images that are producing errors.

The one you experienced issues with is a PNG with a `Y` color space (which controls the brightness, hence grayscale), as opposed to `YUV` color space (which has the ability for colors, but just isn’t using them) that your other image has.

---

<div class="post-metadata">

**Author:** ![rggg](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@rggg](https://discuss.roboflow.com/u/rggg)\
**Post date:** [July 16, 2023, 6:34am UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/12 "2023-07-16T06:34:47Z")

</div>

thank you for that code, however, converting images in the code also cause a white blank in the majority regions of the images

---

<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:** [July 17, 2023, 10:48pm UTC](https://discuss.roboflow.com/t/generated-datasets-producing-black-blank-images/2618/13 "2023-07-17T22:48:09Z")

</div>

Hi @rggg

Could you share the images you had trouble with? I was able to convert the image you sent previously.

Also, if you don’t mind sharing, what source are you getting your images from? Depending on how you are sourcing your images, it might be easier to get you a fix.
