Giter Site home page Giter Site logo

Comments (4)

lsh3163 avatar lsh3163 commented on July 23, 2024 3

This code is working for balanced.csv

def convertlabels(sortlist,labels,textlabels):
    
    clabels=list()
    sortlist = sortlist.split(",") # What I add
    for i in range(len(sortlist)):
        #find index in list corresponding
        index=labels.index(sortlist[i])
        clabel=textlabels[index]
        #pull out converted label
        clabels.append(clabel)
    return clabels 

from download_audioset.

Irving-ren avatar Irving-ren commented on July 23, 2024

This error occurred because the ylabels[i] actually was saving the positive_labels, which is the same type as "/m/01g50p". It's easy to figure that out if you were debugging it. Anyway, the parameter of convertlabels function should be changed. Also, It will work properly if you add the function that could segment the clables variable into a certain format.

Irving

from download_audioset.

newbeepi avatar newbeepi commented on July 23, 2024

Traceback (most recent call last):
File "as_download.py", line 160, in
clabels=convertlabels(ylabels[i],labels,textlabels)
File "as_download.py", line 91, in convertlabels
index=labels.index(sortlist[i])
ValueError: '/' is not in list

I am running into this error when I try and run the script. Im am on mac osx 10.15.4 and have all the dependancies installed. Any help with this would be be greatly appreciated.

2 codes have mistakes
it helped me:

  1. use as_download_unbalanced.py (just rename in 133 line)
  2. 102 line change to os.system("youtube-dl -f bestaudio[ext=m4a] %s"%(link))
  3. remove pafy and shutil

from download_audioset.

jim-schwoebel avatar jim-schwoebel commented on July 23, 2024

Sorry for not maintaining this open source repo - it was rather sloppily constructed - and thank you @lsh3163 for suggesting the improvement. Fixed in 1af21f2

from download_audioset.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.