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

Update global.py #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions global.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# tunable-parameters
#--------------------
images_per_class = 80
fixed_size = tuple((300, 300))
fixed_size = tuple((500, 500))
train_path = "dataset/train"
h5_data = 'output/data.h5'
h5_labels = 'output/labels.h5'
Expand Down Expand Up @@ -49,7 +49,7 @@ def fd_histogram(image, mask=None):
train_labels = os.listdir(train_path)

# sort the training labels
train_labels.sort()
#train_labels.sort()
print(train_labels)

# empty lists to hold feature vectors and labels
Expand All @@ -65,7 +65,7 @@ def fd_histogram(image, mask=None):
current_label = training_name

# loop over the images in each sub-folder
for x in range(1,images_per_class+1):
for x in range(0,images_per_class):
# get the image file name
# file = dir + "/" + str(x) + ".jpg"
file = dir + "/" + "{}_{}.jpg".format(training_name, int(training_name)*100 + x)
Expand Down Expand Up @@ -98,7 +98,7 @@ def fd_histogram(image, mask=None):
print("[STATUS] feature vector size {}".format(np.array(global_features).shape))

# get the overall training label size
print("[STATUS] training Labels {}".format(np.array(labels).shape))
print("[STATUS] training Labels size {}".format(np.array(labels).shape))

# encode the target labels
targetNames = np.unique(labels)
Expand Down