fix imgtrainer and resizes training img