WavX / bioacoustics

bioacoustics package: detect and extract automatically acoustic features in audio recordings
43 stars 13 forks source link

installation issue on Windows 10 #9

Open axelsoundingwild opened 4 years ago

axelsoundingwild commented 4 years ago

Hi there!

I've been through your tutorial, downloaded the package from github, and I have few notes:

  1. this data set has one column more, and I had to add magrtt and dplyr libraries to remove the column (Other-species8)
df3 = quer_xc(qword ='Passerella iliaca type:song cnt:"Canada"', download = FALSE)
df3 = df3[df3$Vocalization_type=="song",]
df3 = df3[df3$Quality %in% c("A", "B"),]
df3 = df3[1:9,]
df3 <- df3 %>%
  select(-"Other_species8")
df = rbind(df1,df2,df3)
rm(df1,df2,df3)
  1. there is no mp3 with this name in the dataset, have changed with an existent one (the first one available from the list)
CATBIC <- read_audio(file.path(data_dir, "Catharus-bicknelli-54866.mp3"))
CATBIC

and also here

CATBIC <- read_audio(file.path(data_dir, "Catharus-bicknelli-54866.mp3"))
TD <- threshold_detection(
  CATBIC, threshold = 12, time_exp = 1, min_dur = 140, max_dur = 440, min_TBE = 10, 
  max_TBE = Inf, EDG = 0.996, LPF = 10000, HPF = 1000, FFT_size = 256, FFT_overlap = 0.875, 
  start_thr = 22, end_thr = 30, SNR_thr = 10, angle_thr = 125, duration_thr = 440, NWS = 1000,
  KPE = 1e-05, KME = 1e-05, settings = FALSE, acoustic_feat = TRUE, metadata = FALSE
)
  1. the results from the threshold_detection section are slightly different in result number.

  2. when introducing Keras, the learning stops when it needs to start and it gives me this error:

Attaching package: �keras�

The following object is masked from �package:tuneR�:

normalize

2020-05-24 14:40:47.939602: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found 2020-05-24 14:40:47.940138: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2020-05-24 14:41:02.752967: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll 2020-05-24 14:41:02.787573: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties: pciBusID: 0000:01:00.0 name: GeForce GTX 1070 with Max-Q Design computeCapability: 6.1 coreClock: 1.379GHz coreCount: 16 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 238.66GiB/s 2020-05-24 14:41:02.789626: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found 2020-05-24 14:41:02.791162: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cublas64_10.dll'; dlerror: cublas64_10.dll not found 2020-05-24 14:41:02.792666: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cufft64_10.dll'; dlerror: cufft64_10.dll not found 2020-05-24 14:41:02.794183: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'curand64_10.dll'; dlerror: curand64_10.dll not found 2020-05-24 14:41:02.795866: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusolver64_10.dll'; dlerror: cusolver64_10.dll not found 2020-05-24 14:41:02.797239: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusparse64_10.dll'; dlerror: cusparse64_10.dll not found 2020-05-24 14:41:02.798654: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found 2020-05-24 14:41:02.798862: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1598] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... 2020-05-24 14:41:02.801400: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2020-05-24 14:41:02.834827: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x25bf739af90 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-05-24 14:41:02.835182: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2020-05-24 14:41:02.836648: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-05-24 14:41:02.837009: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]
Epoch 1/50 7/7 [==============================] - 0s 38ms/step - loss: 0.4523 - categorical_accuracy: 0.8102 Error in py_call_impl(callable, dots$args, dots$keywords) : ValueError: in user code: C:\Users\axeld\AppData\Local\r-miniconda\envs\r-reticulate\lib\site-packages\tensorflow\python\keras\engine\training.py:941 test_function * outputs = self.distribute_strategy.run( C:\Users\axeld\AppData\Local\r-miniconda\envs\r-reticulate\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:951 run * return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs) C:\Users\axeld\AppData\Local\r-miniconda\envs\r-reticulate\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:2290 call_for_each_replica return self._call_for_each_replica(fn, args, kwargs) C:\Users\axeld\AppData\Local\r-miniconda\envs\r-reticulate\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:2649 _call_for_each_replica return fn(args, kwargs) C:\Users\axeld\AppData\Local\r-miniconda\envs\r-reticulate\lib\site-packages\tensorflow\python\keras\engine\training.py:912 test_step

I'm not sure what has actually happened there, maybe something related to Keras? I did install python, tensorflow and keras as requested. Any idea?

Originally posted by @spatialaudiolabs in https://github.com/WavX/bioacoustics/issues/3#issuecomment-633233268

fabianekfrancois commented 4 years ago

Hi,

These "bugs" appeared recently because of some changes in the Xeno Canto database. We should think about a way to make the tutorial self adaptable following XC moving content which could be done with a few minor changes, here and there. Thanks for letting us know...

About Keras this is most probably an issue linked to TensorFlow according to your configuration. It seems some libraries are missing with a failed attempt to use your GPU. You should try to remove current TF and Keras and re install the CPU version or find more guidelines on Internet, since this is not an issue related to our package.

Hope this help! Best, Francois

Le 29 mai 2020 à 12:50, Spatial Audio Labs notifications@github.com a écrit :

Hi there!

I've been through your tutorial, downloaded the package from github, and I have few notes:

this data set has one column more, and I had to add magrtt and dplyr libraries to remove the column (Other-species8) df3 = quer_xc(qword ='Passerella iliaca type:song cnt:"Canada"', download = FALSE) df3 = df3[df3$Vocalization_type=="song",] df3 = df3[df3$Quality %in% c("A", "B"),] df3 = df3[1:9,] df3 <- df3 %>% select(-"Other_species8") df = rbind(df1,df2,df3) rm(df1,df2,df3) there is no mp3 with this name in the dataset, have changed with an existent one (the first one available from the list) CATBIC <- read_audio(file.path(data_dir, "Catharus-bicknelli-54866.mp3")) CATBIC and also here

CATBIC <- read_audio(file.path(data_dir, "Catharus-bicknelli-54866.mp3")) TD <- threshold_detection( CATBIC, threshold = 12, time_exp = 1, min_dur = 140, max_dur = 440, min_TBE = 10, max_TBE = Inf, EDG = 0.996, LPF = 10000, HPF = 1000, FFT_size = 256, FFT_overlap = 0.875, start_thr = 22, end_thr = 30, SNR_thr = 10, angle_thr = 125, duration_thr = 440, NWS = 1000, KPE = 1e-05, KME = 1e-05, settings = FALSE, acoustic_feat = TRUE, metadata = FALSE ) the results from the threshold_detection section are slightly different in result number.

when introducing Keras, the learning stops when it needs to start and it gives me this error:

Attaching package: �keras�

The following object is masked from �package:tuneR�:

normalize 2020-05-24 14:40:47.939602: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found 2020-05-24 14:40:47.940138: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2020-05-24 14:41:02.752967: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll 2020-05-24 14:41:02.787573: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties: pciBusID: 0000:01:00.0 name: GeForce GTX 1070 with Max-Q Design computeCapability: 6.1 coreClock: 1.379GHz coreCount: 16 deviceMemorySize: 8.00GiB deviceMemoryBandwidth: 238.66GiB/s 2020-05-24 14:41:02.789626: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found 2020-05-24 14:41:02.791162: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cublas64_10.dll'; dlerror: cublas64_10.dll not found 2020-05-24 14:41:02.792666: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cufft64_10.dll'; dlerror: cufft64_10.dll not found 2020-05-24 14:41:02.794183: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'curand64_10.dll'; dlerror: curand64_10.dll not found 2020-05-24 14:41:02.795866: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusolver64_10.dll'; dlerror: cusolver64_10.dll not found 2020-05-24 14:41:02.797239: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusparse64_10.dll'; dlerror: cusparse64_10.dll not found 2020-05-24 14:41:02.798654: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found 2020-05-24 14:41:02.798862: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1598] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... 2020-05-24 14:41:02.801400: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 2020-05-24 14:41:02.834827: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x25bf739af90 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-05-24 14:41:02.835182: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2020-05-24 14:41:02.836648: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-05-24 14:41:02.837009: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108] Epoch 1/50 7/7 [==============================] - 0s 38ms/step - loss: 0.4523 - categorical_accuracy: 0.8102 Error in py_call_impl(callable, dots$args, dots$keywords) : ValueError: in user code: C:\Users\axeld\AppData\Local\r-miniconda\envs\r-reticulate\lib\site-packages\tensorflow\python\keras\engine\training.py:941 test_function * outputs = self.distribute_strategy.run( C:\Users\axeld\AppData\Local\r-miniconda\envs\r-reticulate\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:951 run * return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs) C:\Users\axeld\AppData\Local\r-miniconda\envs\r-reticulate\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:2290 call_for_each_replica return self._call_for_each_replica(fn, args, kwargs) C:\Users\axeld\AppData\Local\r-miniconda\envs\r-reticulate\lib\site-packages\tensorflow\python\distribute\distribute_lib.py:2649 _call_for_each_replica return fn(args, kwargs) C:\Users\axeld\AppData\Local\r-miniconda\envs\r-reticulate\lib\site-packages\tensorflow\python\keras\engine\training.py:912 test_step

I'm not sure what has actually happened there, maybe something related to Keras? I did install python, tensorflow and keras as requested. Any idea?

Originally posted by @spatialaudiolabs in #3 (comment)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

axelsoundingwild commented 4 years ago

Hi Francois

Xeno Canto - they keep changing columns it seems, not sure if you can do that, but a self-adaptable solution would be ace.

Keras - I did follow the steps but there are some issues somewhere, I opened a ticket with them to check what the problem could be, it seems that just installing python and Keras is not enough thought atm as you also need to install tensorflow separately (if you don't, an error pops up asking where it is)

Axel

fabianekfrancois commented 4 years ago

Hi Axel,

Yes, we will make some changes in the tutorial to make it self adaptable. I will also create two separate tutorials, one for audio and the other for ultrasounds (bats mostly).

Yes, for using Keras you need to install Tensorflow first. You should be able to do that from your command prompt in Windows after you have installed Python and make sure pip is up to date: https://datatofish.com/upgrade-pip/ https://stackabuse.com/installing-tensorflow-on-windows/ There are plenty of tutorials on how to do it on the Web.

Best, Francois

Le mer. 3 juin 2020 à 03:51, Spatial Audio Labs notifications@github.com a écrit :

Hi Francois

Xeno Canto - they keep changing columns it seems, not sure if you can do that, but a self-adaptable solution would be ace.

Keras - I did follow the steps but there are some issues somewhere, I opened a ticket with them to check what the problem could be, it seems that just installing python and Keras is not enough thought atm as you also need to install tensorflow separately (if you don't, an error pops up asking where it is)

Axel

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/WavX/bioacoustics/issues/9#issuecomment-638026055, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC5DBQTDD5FJLS4FP2SWV7DRUX6ILANCNFSM4NOGFMCQ .