CS4600:高级项目

  • D9_248137
    了解作者
  • 4KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-11 22:23
    上传日期
创建用于识别特定鸟叫的CNN模型的步骤: 从 API下载带有记录信息的JSON对象 wget https://www.xeno-canto.org/api/2/recordings?query=northern+raven 北部乌鸦可以更改为用户想要使用的鸟类 运行该命令后下载的文件可以重命名以满足用户的需求。 打开文件,查看鸟类物种有多少页(它将是JSON对象中numPages的值)。 如果需要鸟类的所有记录,则将页码添加到url中,然后连续运行wget命令。 ( wget ) 在JSON对象中,还有一个记录“ id”,parseBirdId.py可用于获取用于下载记录的鸟形id。 (也可以使用JSON对象中的“文件”参数。) 要启动脚本,请运行parseBirdId.py < "firstBirdIds.txt" 。 这将启动脚本并命名将包含鸟ID的文件。 除非输入包含JS
CS4600-master.zip
  • CS4600-master
  • tensor.py
    900B
  • numpyArray.py
    1KB
  • parseBirdId.py
    476B
  • README.md
    3KB
  • spectro.py
    1.4KB
内容介绍
**STEPS TO CREATE A CNN MODEL FOR RECOGNIZING A SPECIFIC BIRD CALL:** 1. **Download the JSON object with the recording information from the [xeno-canto](https://xeno-canto.org) API** - `wget https://www.xeno-canto.org/api/2/recordings?query=northern+raven` **northern raven can be changed to what ever bird the user would like to use** - The file that is downloaded after running that command can be renamed to fit the needs of the user. Open the file and see how many pages that bird species has (it will be the value of numPages in the JSON object). - If all of the recordings of the bird are needed, add the page number to the url and consecutively run the wget command. (**wget https://xeno-canto.org/api/2/recordings?query=northern+raven&page=2**) - In the JSON object there is also a recording "id" and parseBirdId.py can be used to get the bird id for downloading the recordings. (The "file" parameter in the JSON object could also be used.) - To start the script run `parseBirdId.py < "firstBirdIds.txt"`. That will start the script and name the file that will hold the bird IDs. - The script will not run until you type in the file name holding the JSON object and be sure to wrap "" around the file name. - Use the following command to download all of the mp3 files `for line in 'cat firstBirdIds.txt'; do wget https://xeno-canto.org/${line}/download; done` 2. **Convert the .mp3 audio recordings to .wav files** - Wav files are easier to work with when converting audio to images so run the following command to convert the files to wav: `for file in download*; do ffmpeg -i ${file} ./nraven${file##*.}.wav; done` - Since all the files are named with the format of **download.55**, the previoud command will gather all the download files in the current directory and name them according to their number after the period. 3. **Covert the .wav files into spectrograms** - Use the spectro.py file to convert the wav files into spectrograms to feed to the CNN. **Make sure to change in the spectro.py file: audio_fpath to be the path of your recordings and plt.savefig() to have the name you want for your spectrograms** 4. **Manually sort through the photos** - In order to seperate 'background noise' and the call of the bird you are working with visually inspect the images and sort them into two different directories. 5. **Label, grayscale and resize spectrograms** - Use the numpyArray.py file in order to properly grayscale, resize, and label the images. `python numpyArray.py` **Make sure to change in numpyArray.py: DATADIR to the path of your directory, CATEGORIES to be the categories you are using and IMG_SIZE to be the size you want to work with** 6. **Train the CNN model** - Use the tensor.py file in order to build and train the CNN model. `python tensor.py` **GOOD LUCK!** **SOURCES** https://www.kaggle.com/msripooja/steps-to-convert-audio-clip-to-spectrogram https://www.youtube.com/watch?v=j-3vuBynnOE&list=PLQVvvaa0QuDfhTox0AjmQ6tvTgMBZBEXN&index=2 (Parts 2 and 3)
评论
    相关推荐
    • CasseBrique:https
      CasseBrique:https
    • plaintextoffenders:https
      纯文字罪犯 向报告的域的公开列表
    • 使用socket post 数据到httphttps
      使用socket post 数据到httphttps
    • nodejs http-server开启https的证书
      https证书文件,nodejs http-server开启https的证书,可以直接在本地启动https的协议,方便部署和使用。
    • http https 切换
      http https切换代码,能够实现网站在传输信息的过程中不易遭人盗取
    • Http2Https-crx插件
      将书签中的http转换为https 害怕用https书签替换旧的http书签? 随着许多网站迁移到https,旧的http书签使星标图像为空。 搜索并转换为https! ****************************************************** ***********...
    • LocomotiveCMS https to http-crx插件
      语言:English 将登录网址从https替换为http以进行开发 此扩展程序供使用机车cms开发应用程序时供个人使用。 为了易于在开发模式下使用,此扩展程序将https登录网址替换为http
    • http:https的镜像
      框架HTTP
    • CookieIsolator:分离 HTTPHTTPS cookie
      松散隔离:HTTP cookie 只能在 HTTP 通道中发送,而 HTTPS cookie 可以在 HTTP(不带安全标志)和 HTTPS 通道中发送。 严格隔离:HTTP cookie 和 HTTPS cookie 只能分别在 HTTPHTTPS 通道中发送。 Ext Secure...
    • https协议
      NULL 博文链接:https://willwen.iteye.com/blog/1988199