eto-ai / rikai

Parquet-based ML data format optimized for working with unstructured data
https://rikai.readthedocs.io/en/latest/
Apache License 2.0
137 stars 19 forks source link

Visualization: DSL to scale the Image #523

Closed da-liii closed 2 years ago

da-liii commented 2 years ago
## Scale the image
image = Image("path/to/xyz.jpg")

image1 = image * 2
image2 = image * 0.5
image3 = image * (1, 2)
image4 = image * (2, 1)
image5 = image * (1, 0.5)
image6 = image * (0.5, 1)

## Scale the image and then append the RelativeBox2d
(image * (x, y)) | RelativeBox2d(0.a, 0.b)
changhiskhan commented 2 years ago

Hmmm does this mean we add a Transform abstraction to Rikai.viz? Then you can scale/translate/add noise etc ? Wdyt @eddyxu

eddyxu commented 2 years ago

I can see how resize work. How does general transform work , in what context?

image * (1, 2) deserves a PR for sure.

da-liii commented 2 years ago

closed by #694