Page 1 of 1

After latest update Efficentnet(+V2) are not working

Posted: Tue Aug 23, 2022 9:17 am
by Hanrahahanrahan

Other models seemed fine, but current or new models created with any of the Efficentnet trainers exits with this error:

Code: Select all

08/23/2022 11:04:40 ERROR    Caught exception in thread: '_training_0'
08/23/2022 11:04:44 ERROR    Got Exception on main handler:
Traceback (most recent call last):
  File "T:\Deepfakes\_FaceswapBIN\faceswap\lib\cli\launcher.py", line 201, in execute_script
    process.process()
  File "T:\Deepfakes\_FaceswapBIN\faceswap\scripts\train.py", line 216, in process
    self._end_thread(thread, err)
  File "T:\Deepfakes\_FaceswapBIN\faceswap\scripts\train.py", line 256, in _end_thread
    thread.join()
  File "T:\Deepfakes\_FaceswapBIN\faceswap\lib\multithreading.py", line 121, in join
    raise thread.err[1].with_traceback(thread.err[2])
  File "T:\Deepfakes\_FaceswapBIN\faceswap\lib\multithreading.py", line 37, in run
    self._target(*self._args, **self._kwargs)
  File "T:\Deepfakes\_FaceswapBIN\faceswap\scripts\train.py", line 278, in _training
    raise err
  File "T:\Deepfakes\_FaceswapBIN\faceswap\scripts\train.py", line 268, in _training
    self._run_training_cycle(model, trainer)
  File "T:\Deepfakes\_FaceswapBIN\faceswap\scripts\train.py", line 353, in _run_training_cycle
    trainer.train_one_step(viewer, timelapse)
  File "T:\Deepfakes\_FaceswapBIN\faceswap\plugins\train\trainer\_base.py", line 244, in train_one_step
    self._update_viewers(viewer, timelapse_kwargs)
  File "T:\Deepfakes\_FaceswapBIN\faceswap\plugins\train\trainer\_base.py", line 343, in _update_viewers
    samples = self._samples.show_sample()
  File "T:\Deepfakes\_FaceswapBIN\faceswap\plugins\train\trainer\_base.py", line 643, in show_sample
    return self._compile_preview(preds)
  File "T:\Deepfakes\_FaceswapBIN\faceswap\plugins\train\trainer\_base.py", line 738, in _compile_preview
    display = self._to_full_frame(side, samples, preds)
  File "T:\Deepfakes\_FaceswapBIN\faceswap\plugins\train\trainer\_base.py", line 789, in _to_full_frame
    full = self._process_full(side, full, predictions[0].shape[1], (0, 0, 255))
  File "T:\Deepfakes\_FaceswapBIN\faceswap\plugins\train\trainer\_base.py", line 835, in _process_full
    cv2.rectangle(img, (t_l, t_l), (t_l + length, t_l + length), color, 1)
cv2.error: OpenCV(4.6.0) :-1: error: (-5:Bad argument) in function 'rectangle'
 Overload resolution failed:
  - Layout of the output array img is incompatible with cv::Mat
  - Expected Ptr<cv::UMat> for argument 'img'
  - Layout of the output array img is incompatible with cv::Mat
  - Expected Ptr<cv::UMat> for argument 'img'

Re: After latest update Efficentnet(+V2) are not working

Posted: Tue Aug 23, 2022 9:18 am
by torzdf

I pushed an update which should fix this yesterday. Please update.

If issue still persists, then please provide the full crash log.


Re: After latest update Efficentnet(+V2) are not working

Posted: Tue Aug 23, 2022 9:38 am
by Hanrahahanrahan

That was quick, it's on the latest version. Here's the crash report!


Re: After latest update Efficentnet(+V2) are not working

Posted: Tue Aug 23, 2022 10:11 am
by torzdf

Uggh, that's my bad. I didn't push my local changes last night :roll_eyes:

Try now.


Re: After latest update Efficentnet(+V2) are not working

Posted: Tue Aug 23, 2022 10:46 am
by Hanrahahanrahan

Yeah works now, thanks mate!