FaceDetect / jointCascade_py

Joint Cascade Face Detection and Alignment
104 stars 59 forks source link

An error occured when I am trying to run the train demo? #6

Open GarrickLin opened 9 years ago

GarrickLin commented 9 years ago

Hi, thank you for your publication the code of this paper. It occured an error when I am trying to run the train part in windows7:

File "D:\GK\baiduyun\my_files\Algorithm\人脸检测\JDA\code\python\jointCascade_py-master\cascade\carm\boostCart.py", 
line 29, in __init__ self.dataWrapper

AttributeError: 'BoostCart' object has no attribute 'dataWrapper'

Is there any idea about it? Thank you!

samuel1208 commented 9 years ago

what's your python version

GarrickLin commented 9 years ago

Python 2.7.9

samuel1208 commented 9 years ago

Do you use the latest code

GarrickLin commented 9 years ago

yes

GarrickLin commented 9 years ago

I have changed my workspace to ubuntu, there is still an error reported:

  File "./demo_train.py", line 76, in <module>
    main(sys.argv[1:])
  File "./demo_train.py", line 70, in main
    cascade.train(save_path)    
  File "./../cascade/cascade.py", line 78, in train
    flag = carm.train(posSet, negSet, bootstrap)
  File "./../cascade/carm/boostCart.py", line 49, in train
    bootstrap)
  File "./../cascade/carm/boostCart.py", line 188, in getNegImgData
    flag, conf = self.validate(img[0], rect, initShape)
  File "./../cascade/carm/boostCart.py", line 253, in validate
    dtype=NP.int8)
  File "/usr/lib/python2.7/dist-packages/scipy/sparse/lil.py", line 82, in __init__
    self.shape = (M,N)
  File "/usr/lib/python2.7/dist-packages/scipy/sparse/base.py", line 71, in set_shape
    raise ValueError('invalid shape')
ValueError: invalid shape

have you ever met with this error?

samuel1208 commented 9 years ago

you can debug into the code, And then check the matrix size