Sometimes, the output image will be rotated?
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 850
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 10
Description
## ❓Question
when I use PIL.Image to input an image, I find the output will be rotated! It's horizontal and vertical flips!
if I use opencv to read and convert to PIL.Image , the output will be normal!
Then I use other different images, they are all normal. it is interesting!
this is my convert function,I think it's right:
```
model = ct.convert(
traced_model,
convert_to="neuralnetwork",
source='pytorch',
inputs=[ct.ImageType(name="input",
shape=trace_input.shape,
channel_first=True,
color_layout=ct.colorlayout.RGB,
scale=1 / (255.0),
)],
outputs=[ct.TensorType(name="output")],
)
```

Contributor guide
Research direction
Start with the PIL.Image input path and the shown ct.convert ImageType configuration, then compare the affected image with the OpenCV-to-PIL path. Build a reproducible case around the affected image and conversion inputs; done means the converted output preserves the source orientation while other images remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- opencv, python, pytorch
- Domain
- machine-learning, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100