FluxML / FastAI.jl

Repository of best practices for deep learning in Julia, inspired by fastai
https://fluxml.ai/FastAI.jl
MIT License
589 stars 51 forks source link

Keypoint regression example #221

Closed itan1 closed 2 years ago

itan1 commented 2 years ago

Running these steps in my REPL worked but only gave me the following problem

Running it in a local notebook gives me the following problems

Can someone try to reproduce this? I'm not sure whether these are environments problems (running with julia 1.7.2 and the mac M1 arm architecture is not fully supported yet).

lorenzoh commented 2 years ago

Thanks for taking a look at this!

The first image plotted with DataAugmentation.showitems looks like this

I think this should be solved by a an using ImageShow import

the FastAI.decodeypred(task, Training(), y) check does not have the same coordinates as the original keypoint k

It does not give the same keypoint since the image is cropped to 128x128. Important part is that the decoded keypoint is within those bounds 👍

The kernel dies every time I try to run showbatch(task, (xs, ys))

Cannot reproduce this, may be a problem with Makie.jl on ARM :/ . Have you tried updating packages in your environment?

lorenzoh commented 2 years ago

Changes look good to me, merging!

itan1 commented 2 years ago

Great thank you too! This package is helping me a lot 🙌

the FastAI.decodeypred(task, Training(), y) check does not have the same coordinates as the original keypoint k

It does not give the same keypoint since the image is cropped to 128x128. Important part is that the decoded keypoint is within those bounds 👍

Ok thanks for the clarification, I think I got it. The decode function only reverses the coordinate normalization, not the cropping. Is that correct?

lorenzoh commented 2 years ago

Exactly, since the cropping is a destructive operation