unseen labels
I'm trying to start training on UCF101 dataset just as your tutorial shows but I'm getting the follwing error.
Traceback (most recent call last):
File "UCF101_ResNetCRNN.py", line 168, in
For some odd reason it seems to be chopping some letters from the labels list.
Do you know what could be done?
Check the code in File "UCF101_ResNetCRNN.py", line 168
It should be: all_names = [] for f in fnames: loc1 = f.find('v_') loc2 = f.find('_g') actions.append(f[(loc1 + 2): loc2])
all_names.append(f)
If this the same code in your case, you could try actions.append(f[(loc1 + 1): loc2 + 1]) Maybe your environment causes the f.find() command to output another value than the line before the argument occurs. I don't know
I'm trying to start training on UCF101 dataset just as your tutorial shows but I'm getting the follwing error.
Traceback (most recent call last): File "UCF101_ResNetCRNN.py", line 168, in all_y_list = labels2cat(le, actions) # all video labels File "C:\Users\Windows\Documents\video-classification-master\ResNetCRNN\functions.py", line 14, in labels2cat return label_encoder.transform(list) File "C:\Users\Windows\AppData\Roaming\Python\Python36\site-packages\sklearn\preprocessing\label.py", line 257, in transform _, y = encode(y, uniques=self.classes, encode=True) File "C:\Users\Windows\AppData\Roaming\Python\Python36\site-packages\sklearn\preprocessing\label.py", line 110, in _encode return _encode_numpy(values, uniques, encode) File "C:\Users\Windows\AppData\Roaming\Python\Python36\site-packages\sklearn\preprocessing\label.py", line 53, in _encode_numpy % str(diff)) ValueError: y contains previously unseen labels: ['ableTennisSho', 'abyCrawlin', 'aftin', 'aiCh', 'aircu', 'alanceBea', 'alkingWithDo', 'allPushup', 'alsaSpi', 'ammerThro', 'ammerin', 'andMarchin', 'andstandPushup', 'andstandWalkin', 'arallelBar', 'aseballPitc', 'asketbal', 'asketballDun', 'avelinThro', 'ayakin', 'ceDancin', 'eadMassag', 'enchPres', 'encin', 'ennisSwin', 'havingBear', 'hotpu', 'hrowDiscu', 'ieldHockeyPenalt', 'ighJum', 'ikin', 'ilitaryParad', 'illiard', 'ivin', 'ixin', 'izzaTossin', 'kateBoardin', 'kiin', 'kije', 'kyDivin', 'layingCell', 'layingDa', 'layingDho', 'layingFlut', 'layingGuita', 'layingPian', 'layingSita', 'layingTabl', 'layingVioli', 'leanAndJer', 'liffDivin', 'loorGymnastic', 'lowDryHai', 'lowingCandle', 'nevenBar', 'nittin', 'oY', 'occerJugglin', 'occerPenalt', 'ockClimbingIndoo', 'odyWeightSquat', 'oleVaul', 'olfSwin', 'olleyballSpikin', 'ommelHors', 'ongJum', 'opeClimbin', 'oppingFloo', 'orseRac', 'orseRidin', 'owin', 'owlin', 'oxingPunchingBa', 'oxingSpeedBa', 'pplyEyeMakeu', 'pplyLipstic', 'rampolineJumpin', 'rcher', 'reastStrok', 'ricketBowlin', 'ricketSho', 'risbeeCatc', 'ritingOnBoar', 'rontCraw', 'rummin', 'rushingTeet', 'tillRing', 'ugglingBall', 'ulaHoo', 'ullUp', 'umoWrestlin', 'umpRop', 'umpingJac', 'unc', 'unchuck', 'unge', 'urfin', 'ushUp', 'uttingInKitche', 'win', 'ypin']
For some odd reason it seems to be chopping some letters from the labels list.
Do you know what could be done?
Hello, did you figure out this problem? I had the same question.
Hello, I just used code like that, It should be: all_names = [] for f in fnames: loc1 = f.find('v_') loc2 = f.find('_g') actions.append(f[(loc1 + 2): loc2])
The result is y contains previously unseen labels: ['DS_Stor'], how to deal with that, thank you for your help.
Hello, I just used code like that, It should be: all_names = [] for f in fnames: loc1 = f.find('v_') loc2 = f.find('_g') actions.append(f[(loc1 + 2): loc2])
The result is y contains previously unseen labels: ['DS_Stor'], how to deal with that, thank you for your help.
Under gpu, it shows unseen labels , ['pegs_25']