質問

I have some manually annotated ground truth images color-coding some object. When I resize them (to have X and Y as training images with lower resolution i.e. faster processing time), something changes the label color inside the ground truth.

from PIL import Image   
  ground_truth=Image.open(//location)
  ground_truth_resized = ground_truth.resize(size, Image.ANTIALIAS)
  ground_truth_resized.save(//destination folder)

I presume the antialias is doing something to change the color (i.e. label ) I am going from 1024x768 to 640x480, essentially preserving the aspect ratio

How can I reduce resolution but keep labels?

役に立ちましたか?

解決

Removing the ANTIALIAS solves the problem

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top