giulbia / baby_cry_detection

Recognition of baby cry audio signal
250 stars 116 forks source link

makeprediction.py cant find proper arguments #9

Closed dingusagar closed 6 years ago

dingusagar commented 6 years ago

in the makeprediction.py file

parser = argparse.ArgumentParser()
parser.add_argument('--load_path_data',
                    default='%s/../recording/' % os.path.dirname(os.path.abspath(__file__)))
parser.add_argument('--load_path_model',
                    default='%s/../model/' % os.path.dirname(os.path.abspath(__file__)))
parser.add_argument('--save_path',
                    default='%s/../prediction/' % os.path.dirname(os.path.abspath(__file__)))

These codes expect two folders model and prediction. But they are not there. What should I do to get those folders with appropriate files.

dingusagar commented 6 years ago

I think I did not run the training program to get the models...Which program should I run in order to train the classifier.

giulbia commented 6 years ago

Hi,

Training the model is supposed to happen on your computer (not on RaspberryPi) so you need to train it by executing pc_main/train_model.py.

dingusagar commented 6 years ago

I tried to run train_model.py I am getting the following error

Traceback (most recent call last): File "train_model.py", line 70, in main() File "train_model.py", line 45, in main X = np.load(os.path.join(load_path, 'dataset.npy')) File "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 370, in load fid = open(file, "rb") IOError: [Errno 2] No such file or directory: '/opt/baby_cry_detection/pc_main/../../output/dataset/dataset.npy'

giulbia commented 6 years ago

Sorry I didn't specify that you have to run _trainset.py. This is because first you need to do the feature engineering and _trainset.py does exactly that. It then saves data as a numpy file (dataset.npy).

Please note that at the top of the script _trainset.py, you can set the folder where to save dataset.npy. Make sure that train_model.py reads dataset.npy from the same folder (you can set it at the top of the script)

dingusagar commented 6 years ago

ok thanks ...train_set.py is taking a lot of time to execute...if you could upload the results of the training programs, then we could directly use them in the raspberry pi

prashanthkolaneru commented 6 years ago

what are feature engineering should be done to get vectors