Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Training problem under windows OS #3

Open
ertankucukoglu opened this issue Apr 24, 2017 · 8 comments
Open

Training problem under windows OS #3

ertankucukoglu opened this issue Apr 24, 2017 · 8 comments

Comments

@ertankucukoglu
Copy link

Hello,

When I try to run train_set.py I get below error message
C:\baby_cry_detection-master\pc_main>train_set.py Traceback (most recent call last): File "C:\baby_cry_detection-master\pc_main\train_set.py", line 5, in <module> import numpy as np ModuleNotFoundError: No module named 'numpy'

And If I try to install numpy module I get following error message
`C:\baby_cry_detection-master\pc_main>python -m pip install numpy
Collecting numpy
Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy

C:\baby_cry_detection-master\pc_main>`

My questions are:
1- Is there any way I can train on my Windows computer? I prefer it because it is powerful with i7 CPU.
2- If I am to run train_set.py in Raspberry Pi, with latest about 60 audio files to train. How long I can expect it to finish training?

Thank you.

@giulbia
Copy link
Owner

giulbia commented Apr 26, 2017

Hi,

I've never tried to run it on Windows OS but there's no reason why it shouldn't work.

Why do you do python -m pip install numpy ? I'd rather do a simple pip install numpy. Also, what distribution of python are you working with ? I'm using python 2.7 installed with Anaconda. The advantage of anaconda, is that it comes with a lot of preinstalled packages, numpy being one of them.

As for your second question, I am afraid that training the model on a reduced train set would degrade a lot its performance. I don't know how much time it could take, the feature engineering step is already expensive at prediction time on only one signal (it takes about 30 seconds on my Raspberry Pi to record the signal, cut it, derive features, and apply the model).

@ertankucukoglu
Copy link
Author

ertankucukoglu commented Apr 27, 2017

I am a total newbie to Python. I saw python -m pip install numpy command on the internet and used it. I just try pip install numpy and it started to download a package. I will continue and see if I will have any more issues.

I didn't ask about reduced train set. Actually, I asked how long it takes to process sound files and create fingerprint files in terms of hours. I think you provided about 60 cry files.

@ertankucukoglu
Copy link
Author

All right, as soon as numpy is installed. I tried it and having below error. As I do not know python, Unfortunately, I couldn't see how to fix it.

C:\baby_cry_detection-master\pc_main>train_set.py
Traceback (most recent call last):
  File "C:\baby_cry_detection-master\pc_main\train_set.py", line 10, in <module>
    from pc_methods import Reader
ModuleNotFoundError: No module named 'pc_methods'

C:\baby_cry_detection-master\pc_main>

What I observe is that I am running script under pc_main directory and it is trying to import another directory which is one level up. That might be totally wrong though.

@giulbia
Copy link
Owner

giulbia commented May 9, 2017

What I observe is that I am running script under pc_main directory and it is trying to import another directory which is one level up. That might be totally wrong though.

I see you are running your code from inside the pc_main folder. You should launch it from the its parent folder baby_cry_detection-master as follows: python pc_main/train_set.py.

I didn't ask about reduced train set. Actually, I asked how long it takes to process sound files and create fingerprint files in terms of hours. I think you provided about 60 cry files.

There are 108 fragments 5 second long in the training set. On the Raspberry Pi, I record a 9 second long signal, I cut it in 5 fragments 5 second long, I process and make a prediction on each of them. Only if at least 3 out of 5 is predicted as a baby cry I actually assume it is really a baby cry. This process takes about 1 minute and a half on my Raspberry Pi. I still need to speed up this step. I hope I answered your question.

@ertankucukoglu
Copy link
Author

It seems I am having same error about module even if I try to call train_set.py from an upper directory.

C:\baby_cry_detection-master>python pc_main/train_set.py
Traceback (most recent call last):
  File "pc_main/train_set.py", line 10, in <module>
    from pc_methods import Reader
ModuleNotFoundError: No module named 'pc_methods'

C:\baby_cry_detection-master>

Is there anything else I can try?

@giulbia
Copy link
Owner

giulbia commented May 11, 2017

I'm not sure what's wrong. Let's try to check something.

In baby_cry_detection/pc_methods/__init__.py, do you have class Reader?

@ertankucukoglu
Copy link
Author

ertankucukoglu commented May 11, 2017

Yes, there is Reader class in pc_methods/__init__.py

However, pc_main/__init__.py is an empty file. If that is not normal, there is something wrong I did while getting the latest branch from github.

@giulbia
Copy link
Owner

giulbia commented May 11, 2017

Yes, pc_main/__init__.py is empty and that's normal.

Can this help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants