Evizero / Augmentor.jl

A fast image augmentation library in Julia for machine learning.
https://evizero.github.io/Augmentor.jl/
Other
138 stars 47 forks source link

Introduce RCropSize() - Function for generating random crops of fixed size #64

Closed maxfreu closed 4 years ago

maxfreu commented 4 years ago

Hi, I couldn't find a function to generate random crops of fixed size from a larger image, so I wrote one. If this was already possible this might be a bit embarrassing, because I didn't find out how - but anyway; it now works like a charm, including tests :-)

using ImageView, Augmentor
img = testimage()
pl = RCropSize(100)
imshow(augment(img, pl))

EDIT: Local test all pass - the failing tests are hopefully unrelated.

johnnychen94 commented 4 years ago

Wow, nice! You're correct that this isn't available; there's also a plan #21 for this.

The failure isn't your fault, it's just that this package doesn't get fairly maintained. I'll come and fix that later this week and then get this PR in.

Edit: I may need another week to catch up with the work here.

maxfreu commented 4 years ago

Ping :)

johnnychen94 commented 4 years ago

Let me see if all things pass with #66

johnnychen94 commented 4 years ago

Sorry for the long delay, I was too busy with my school work to fix things here. A very nice implementation and I like the test here. @maxfreu Thanks!

I just tagged a release (v0.6.1) for this PR. I'll add this into docs later in #52

maxfreu commented 4 years ago

Hey, cool to see this merged, thanks for the effort! :)