" - created 1000 images on a clean background variable 1 to 5 of the same beetle, model detected well on test set of 100 images (val/exp or exp2 or exp3) (proof of concept)\n",
" - created 1000 images on a clean background variable 0 to 5 beetles of 6 different types of beetles, performing\n",
" \n",
"TODO:\n",
" - created 1000 images on a clean background variable 0 to 5 beetles of 6 different images and 0 to 5 non-beetles of _ different images, performing\n",
" - created 1000 images on a clean background variable 0 to 10 beetles of 15 different images and 0 to 10 non-beetles of _ different images\n",
" - created 1000 images on a clean background variable 0 to 10 beetles of 15 different images and 0 to 10 non-beetles of _ different images on a dirty background\n",
" - perform auto cropping on arduino and include "
]
}
}
],
],
"metadata": {
"metadata": {
...
...
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
importglob
importglob
fromPILimportImage
fromPILimportImage
importpillow_heif
importpillow_heif
importpandasaspd
importpandasaspd
importnumpyasnp
importnumpyasnp
fromtorchvision.utilsimportsave_image
fromtorchvision.utilsimportsave_image
importtorchvision.transforms.functionalasfn
importtorchvision.transforms.functionalasfn
importtorchvision.transformsastransforms
importmatplotlib.pyplotasplt
```
```
%% Cell type:code id: tags:
%% Cell type:code id: tags:
``` python
``` python
# TODO: overlap?
# generates new dataset by pasting beetles and non-beetles in the same picture.
#returns array of new images and coordinates
#TODO: make sure that the beetles and non-beetles don't overlap with each other
File /raid/projects/akhot2/conda/envs/akhot2/lib/python3.9/site-packages/torch/autograd/grad_mode.py:27, in _DecoratorContextManager.__call__.<locals>.decorate_context(*args, **kwargs)
8
24 @functools.wraps(func)
9
25 def decorate_context(*args, **kwargs):
10
26 with self.clone():
11
---> 27 return func(*args, **kwargs)
12
File /raid/projects/akhot2/conda/envs/akhot2/lib/python3.9/site-packages/torchvision/utils.py:152, in save_image(tensor, fp, format, **kwargs)
13
150 if not torch.jit.is_scripting() and not torch.jit.is_tracing():
14
151 _log_api_usage_once(save_image)
15
--> 152 grid = make_grid(tensor, **kwargs)
16
153 # Add 0.5 after unnormalizing to [0, 255] to round to nearest integer
File /raid/projects/akhot2/conda/envs/akhot2/lib/python3.9/site-packages/torch/autograd/grad_mode.py:27, in _DecoratorContextManager.__call__.<locals>.decorate_context(*args, **kwargs)
- created 1000 images on a clean background variable 1 to 5 of the same beetle, model detected well on test set of 100 images (val/exp or exp2 or exp3) (proof of concept)
- created 1000 images on a clean background variable 0 to 5 beetles of 6 different types of beetles, performing
TODO:
- created 1000 images on a clean background variable 0 to 5 beetles of 6 different images and 0 to 5 non-beetles of _ different images, performing
- created 1000 images on a clean background variable 0 to 10 beetles of 15 different images and 0 to 10 non-beetles of _ different images
- created 1000 images on a clean background variable 0 to 10 beetles of 15 different images and 0 to 10 non-beetles of _ different images on a dirty background