updated img-level fitting with python-implemented gradient. this version seems functional (although the addition_func isn't). more images might be needed to prevent hyperopt-level overfitting