ocropus-archive / DUP-ocropy

Python-based tools for document analysis and OCR
Apache License 2.0
3.41k stars 590 forks source link

Mean of empty slice error? #297

Closed gjerome5 closed 5 years ago

gjerome5 commented 6 years ago

Can any one tell me, while creating a training model the below error is triggering.....so please kindly provide me the solution..

C:\Python27\lib\site-packages\numpy\core\fromnumeric.py:2957: RuntimeWarning: Mean of empty slice.
  out=out, **kwargs)
Traceback (most recent call last):
  File "ocropus-rtrain", line 293, in <module>
    network.lnorm.measure(np.amax(line)-line)
  File "C:\Users\jenova jasmine\Desktop\ocropy-master\ocrolib\lineest.py", line 38, in measure
    self.mad = mean(deltas[line!=0])
  File "C:\Python27\lib\site-packages\numpy\core\fromnumeric.py", line 2957, in mean
    out=out, **kwargs)
  File "C:\Python27\lib\site-packages\numpy\core\_methods.py", line 80, in _mean
    ret = ret.dtype.type(ret / rcount)
FloatingPointError: invalid value encountered in double_scalars

Environment Setup

zuphilip commented 6 years ago

What command did you use for training? Besides the warning there is also a FloatingPointError... Do you see this immediately or is the training process working for a while? Does the ./run-rtrain work?

zuphilip commented 5 years ago

Closing this issue because of inactivity. If the problem remains, then feel free to reopen it.