Closed gwern closed 4 years ago
FYI I decided to have a more general solution and provided two flags to support saving either just 1 cropped object or all objects. The file name is thus a bit different from the script you provided.
Sounds good to me. Cropping just one object suited my usecase, but others may prefer to crop out every possibility and clean by hand or something.
It would be good if the provided script could crop images down to detected figures/faces instead of just providing JSON & visualizations. For the purpose of adding data augmentation to our Danbooru2019 BigGAN to help it learn solo figures (we already have a cropped portrait dataset, which improved learning of faces noticeably), I added a pass to
infer_from_image.py
which looks like this:A cleaned-up and configurable version which crop out each bounding box would be a good addition.
On a side note, it'd be nice if this would use both my GPUs. I'm also not sure this is properly minibatching: it seems a lot slower than I'd expect, and the GPU utilization in
nvidia-smi
is a lot bouncier and usually <100%.