kristinbranson / APT

Animal Part Tracker
GNU General Public License v3.0
71 stars 16 forks source link

Only one type of flipping allowed during augmentation? #413

Open adamltaylor opened 4 months ago

adamltaylor commented 4 months ago

Using commit 0916018a, tracking using the "Top-Down (head/tail): Multianimal GRONe + GRONe" algorithm with the default training parameters, and "Auto compute training parameters" checked leads to an error during training:

2024-02-12 15:29:38,752 /groups/stern/home/shiozakih/APT/APT/deepnet/APT_interface.py:5006 main() [ERROR] APT_interface errored: {e}, {type(e)}
Traceback (most recent call last):
  File "/groups/stern/home/shiozakih/APT/APT/deepnet/APT_interface.py", line 5004, in main
    run(args)
  File "/groups/stern/home/shiozakih/APT/APT/deepnet/APT_interface.py", line 4785, in run
    train_multi_stage(args,nviews,conf_raw)
  File "/groups/stern/home/shiozakih/APT/APT/deepnet/APT_interface.py", line 4250, in train_multi_stage
    train(lbl_file, nviews, name, args, first_stage=True)
  File "/groups/stern/home/shiozakih/APT/APT/deepnet/APT_interface.py", line 4272, in train
    conf = create_conf(lbl_file,
  File "/groups/stern/home/shiozakih/APT/APT/deepnet/APT_interface.py", line 705, in create_conf
    return create_conf_json(lbl_file=lbl,view=view, name=name, cache_dir=cache_dir, net_type=net_type, conf_params=conf_params, quiet=quiet, json_trn_file=json_trn_file, first_stage=first_stage, second_stage=second_stage, config_file=config_file)
  File "/groups/stern/home/shiozakih/APT/APT/deepnet/APT_interface.py", line 1276, in create_conf_json
    assert not (conf.vert_flip and conf.horz_flip), 'Only one type of flipping, either horizontal or vertical is allowed for augmentation'
AssertionError: Only one type of flipping, either horizontal or vertical is allowed for augmentation

Can be worked-around about unchecking either horizonal or vertical flipping in the top-down training options.