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

about shanghai dataset on evaluation #47

Open
Smallwhite999 opened this issue Mar 28, 2022 · 3 comments
Open

about shanghai dataset on evaluation #47

Smallwhite999 opened this issue Mar 28, 2022 · 3 comments

Comments

@Smallwhite999
Copy link

The model can be trained normally during training, but an error is reported during testing. Does anyone know how to solve it?

File "F:\PycharmProjects\MNAD\Evaluate1.py", line 114, in valrec1
labels_list = np.append(labels_list,labels[0][4+label_length:videos[video_name]['length']+label_length])
IndexError: invalid index to scalar variable.
This error is also reported on Linux

The following is the structure of Shanghai data set:
图片

@TanMing11
Copy link

the label of the shanghai dataset is a list not a dict, so the code to generate the corresponding label_list is:
labels_list = np.append(labels_list, labels[4+label_length:videos[video_name]['length']+label_length])

@Smallwhite999
Copy link
Author

the label of the shanghai dataset is a list not a dict, so the code to generate the corresponding label_list is: labels_list = np.append(labels_list, labels[4+label_length:videos[video_name]['length']+label_length])

It has been solved perfectly, thank you

@huyi1998
Copy link

huyi1998 commented Jun 2, 2022

can you show your code to github? I have some problems,and I want to see your code.

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

3 participants