-
Notifications
You must be signed in to change notification settings - Fork 6
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
Sergey cheremshinsky #9
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Looks Good To Me
Except:
Please move you work to the /[username]_code
location, as described in readme
https://github.com/rnd4u-org/2021-knu-cairl#development
I'll approve after that
Also that's a good approach that you are using separate .py files rather than a single jupyter notebook
main.py
Outdated
x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2) | ||
x_train = x | ||
y_train = y | ||
# exit() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually it's better to remove unused code from the project. It helps readability
main.py
Outdated
print('Exported!') | ||
|
||
|
||
generateAns() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may consider using if __name__ == "__main__"
in the python code to indicate entry points to the program
…3(mask)/get_faces.py
…3(mask)/load_data.py
I fixed placements of files. Added solution for mask classification. |
On masks dataset used inception v3 with 1024 512 and 128 dense layers. Trained in 3 steps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check other comments
Regarding task 3:
You can try rerun model few times without saving .npy
indexes. So you'll test model on few different train/test splits
y_test = np.load('y_test.npy', allow_pickle=True) | ||
|
||
return (x_train, x_test, y_train, y_test) | ||
except Exception: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to use less general errors or if statements
epochs=10, | ||
validation_data=(x_test, y_test), | ||
validation_steps=1511 // batch, | ||
steps_per_epoch=6042 // batch, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add constants and description for magical numbers like 1511 and 6042
x_test = [images[i] for i in indexes[n:]] | ||
|
||
y_train = [labels[i] for i in indexes[:n]] | ||
y_test = [labels[i] for i in indexes[n:]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use existing train test split function to assure correct execution
https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html
I used saving of model and saving of splited data mostly because that's hard for my laptop to finish training in some reasonable amount of time. So I splited training for three nights saving model after each and using same split of data |
I fixed mistakes that you mentioned about task 3 and also pushed solution for task 4 |
Description
Start - Preprocessing data "spliting columns. Example:
Embark that has values S, Q, C splited into
Embark_S, Embark_Q, Embark_C with values 0 or 1
Train - made function that train 5 models from sklearn and allow them to vote
on validation test showes ~82.5% accuracy
also made neural network using tensorflow with ~86% accuracy
However both tries showes only 76-80% accuracy on kaggle
How has this been tested?