Skip to content

Instantly share code, notes, and snippets.

View batuhandaz's full-sized avatar

Batuhan Daz batuhandaz

View GitHub Profile
@batuhandaz
batuhandaz / Create_Data_And_Name_Files.py
Created May 9, 2021 12:20
Create_Data_And_Name_Files.py
full_path_to_images = 'dosya yolu'
c = 0
with open(full_path_to_images + '/' + 'classes.names', 'w') as names, \
open(full_path_to_images + '/' + 'classes.txt', 'r') as txt:
for line in txt:
names.write(line) # Copying all info from file txt to names
@batuhandaz
batuhandaz / Create_Train_And_Text_Files.py
Last active May 9, 2021 12:18
Create_Train_And_Text_Files.py
import os
full_path_to_images = '/DOSYAYOLU'
os.chdir(full_path_to_images)
p = []
for current_dir, dirs, files in os.walk('.'):
for f in files:
@batuhandaz
batuhandaz / Tenserflow_Temel_Sınıflandırma.py
Created May 2, 2021 21:33
Tenserflow_Temel_Sınıflandırma.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun May 2 23:37:07 2021
@author: batuhan
"""
#Tenserflow ve Gerekli Kütüphanelerin eklenmesi
import tensorflow as tf
import numpy as np
@batuhandaz
batuhandaz / Principal_Component_Analysis_3.py
Created March 25, 2021 19:31
Principal_Component_Analysis_3.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 25 22:26:17 2021
@author: batuhan
"""
from sklearn import datasets
import pandas as pd
import matplotlib.pyplot as plt
@batuhandaz
batuhandaz / Principal_Component_Analysis_2.py
Created March 25, 2021 19:22
Principal_Component_Analysis_2.py
import numpy as np
rng=np.random.RandomState(1)
x=np.dot(rng.rand(2,2),rng.randn(2,200)).T
print(x.shape)
import matplotlib.pyplot as plt
plt.scatter(x[:,0],x[:,1])
plt.show()
from sklearn.decomposition import PCA
pca = PCA(n_components= 2)
pca.fit(x)
@batuhandaz
batuhandaz / Principal_Component_Analysis_1.py
Created March 25, 2021 19:20
Principal_Component_Analysis_1.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 25 22:18:16 2021
@author: batuhan
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
@batuhandaz
batuhandaz / Histogram_of _Gradients_3.py
Created March 25, 2021 19:17
Histogram_of _Gradients_3.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 25 22:14:11 2021
@author: batuhan
"""
from skimage.io import imread
from skimage.transform import resize
@batuhandaz
batuhandaz / Histogram_of _Gradients_2.py
Created March 25, 2021 19:14
Histogram_of _Gradients_2.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 25 21:59:14 2021
@author: batuhan
"""
#kütüphanler eklenir
from skimage.io import imread, imshow
from skimage.transform import resize
@batuhandaz
batuhandaz / Histogram_of _Gradients.py
Created March 25, 2021 18:57
Histogram_of _Gradients.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 25 21:56:30 2021
@author: batuhan
"""
import matplotlib.pyplot as plt
from skimage.feature import hog
from skimage import data, exposure
@batuhandaz
batuhandaz / Scale_Invariant_Feature_Transform_1.py
Last active March 25, 2021 18:56
Scale_Invariant_Feature_Transform.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 25 21:39:02 2021
@author: batuhan
"""
#kütüphaneler eklenir
import cv2
#görsel alınır ve gri formata çevirilir