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

create label file for ResNet model #513

Merged
merged 3 commits into from
Mar 16, 2023

Conversation

laurasootes
Copy link
Contributor

Created label file for ResNet model, included script and resulting txt file

@laurasootes laurasootes linked an issue Mar 15, 2023 that may be closed by this pull request
@laurasootes laurasootes requested review from stefsmeets and cpranav93 and removed request for stefsmeets March 16, 2023 12:09
Copy link
Contributor

@cpranav93 cpranav93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great! My only thought is: Should we move the get_resnet*.py to the tutorials folder or elsewhere? or is this the best place for it?

@cpranav93
Copy link
Contributor

Also good to fix the linter errors on the get_resnet.py file!

@laurasootes
Copy link
Contributor Author

yeah, I totally agree. This script is really only to show how I obtained the txt file and has no other purpose. Maybe I can simply paste the script in this issue for the logging, and then delete the file as it has no other use

@cpranav93
Copy link
Contributor

Yeah, that is a good idea! Good to have it archived somewhere (such as here) but its not needed otherwise.

@laurasootes
Copy link
Contributor Author

Code used to generate label file

"""write all class labels for the ResNet50 model to a txt file"""
import numpy as np
from tensorflow.keras.applications.resnet50 import decode_predictions

class_names = [decode_predictions(np.eye(1,1000, i))[0][0][1] for i in range(0, 1000)]

with open('labels_resnet50.txt', 'w', encoding="utf-8") as file:
    file.write('\n'.join(class_names))

@laurasootes laurasootes merged commit 6b4cf3f into main Mar 16, 2023
@laurasootes
Copy link
Contributor Author

Closes #512

@geek-yang geek-yang deleted the 512-dashboard-add-label-file-for-resnet branch April 3, 2023 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dashboard: add label file for RESnet
3 participants