This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
architecture: YOLOv3 | |
use_gpu: false | |
max_iters: 250000 | |
log_smooth_window: 100 | |
log_iter: 100 | |
save_dir: output | |
snapshot_iter: 10000 | |
metric: COCO | |
pretrain_weights: https://paddle-imagenet-models-name.bj.bcebos.com/ResNet50_vd_ssld_pretrained.tar | |
weights: output/ppyolo/model_final |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Import Statements ## | |
import pickle | |
## Storing the Data ## | |
file = open('examplePickle', 'ab') | |
pickle.dump(model, file) | |
file.close() | |
## Retriving the Data ## | |
file = open('examplePickle', 'rb') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Creating the enviornment | |
conda create -n tensorflow1 python==3.6.9 | |
#Check available environement on system | |
conda env list | |
#Activate environement | |
conda activate <name> | |
#Stable version of tensorflow 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Convert singular value of y to one hot encoding# | |
from tensorflow.keras.utils import to_categorical | |
y_train_encoded = to_categorical(y_train) | |
y_test_encoded = to_categorical(y_test) | |
#Visualize the keras model# | |
from tensorflow.keras.utils import plot_model | |
from IPython.display import Image | |
plot_model(model, to_file='model.png', show_shapes=True, show_layer_names=True,rankdir='LR',dpi=96)#change rankdir='TB' for horizontal plot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\d : [0-9] single \D : not of \d | |
\w : [0-9][a-z][A-Z] single \W : not of \w | |
\s : whitespace or tab \S : not of \s | |
Special Characters: | |
. —> any character (including spaces) | |
* —> 0 or more | |
+ —> 1 or more | |
x? —> x is character and which is optional | |
[ ] —> referring as set of characters appearing anyone from set |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Installation | |
sudo apt-get install python3.x | |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | |
python3.x get-pip.py | |
pip install --upgrade virtualenv | |
2. Creating the virtual environment | |
Go to pycharm add python interpreter in virtualenv envirnomnet | |
Obtain installed path of python [usually /usr/bin/python3.x] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# compare different numbers of features selected using anova f-test | |
from numpy import mean | |
from numpy import std | |
from pandas import read_csv | |
from sklearn.model_selection import cross_val_score | |
from sklearn.model_selection import RepeatedStratifiedKFold | |
from sklearn.feature_selection import SelectKBest | |
from sklearn.feature_selection import f_classif | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.pipeline import Pipeline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alt + Enter --> Error, Suggestions and fixes | |
ctr + D ---> Duplicate the line | |
ctr + shift + arrow --> Change poisition of the line | |
ctr + X [without selecting] --> Delete whole line | |
ctr + / --> Adding comments | |
alt + shift + ctr + j ---> Multiple cursors on same occurence | |
shift + F6 --> refactor or rename variable with all occurence | |
ctr + alt + v --> convert expression to variable | |
ctr + alt + m --> convert expression to function | |
ctr + alt + l --> reformat the code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTML quottation --> same as medium quotation | |
HTML image map --> Create the clickable areas on the image | |
Add icon to webpage --> HTML favicon | |
p and div vs when to use span --> p when we want to occupy new line vs span dont start in new line and dont add extra space | |
class vs id --> class can be assigned to many elements but id wont | |
<details> --> To provide small information in the form of widget | |
<figcaption> --> To provide the caption to the figure | |
  --> To add extra space ; < (less than) ; > (greater than) ; & (ampersand) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue Jul 12 10:49:03 2022 | |
@author: pritul | |
""" | |
import pandas as pd | |
import os |
OlderNewer