Skip to content

Commit

Permalink
Merge pull request #16 from Atashnezhad/feature/img_pro
Browse files Browse the repository at this point in the history
Feature/img pro
  • Loading branch information
Atashnezhad committed Oct 19, 2023
2 parents a69b677 + 8a0a54d commit 31747ac
Show file tree
Hide file tree
Showing 8 changed files with 675 additions and 67 deletions.
Binary file modified assets/scikit_image_example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/scikit_image_example_core.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions neural_network_model/class_labels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"GRANODIORITE": 0, "MONZONITE": 1, "QUARTZ_DIORITE": 2}
10 changes: 10 additions & 0 deletions neural_network_model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,16 @@ class Config:
# Allow extra fields in the model (to ignore the pydantic ConfigError)
extra = Extra.allow

SUPPORTED_FILE_FORMATS: list = [
".jpg",
".jpeg",
".png",
".bmp",
".tif",
".tiff",
".gif",
]


class localBinaryPatterns(BaseModel):
NUM_POINTS: int = 8
Expand Down
3 changes: 2 additions & 1 deletion neural_network_model/process_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,8 @@ def augment_data(
img = load_img(img_address)

x = img_to_array(img)
x = x.reshape((1,) + x.shape())
# x = x.reshape((1,) + x.shape())
x = x.reshape((1,) + x.shape)

for _ in Augment_data_gen.flow(
x,
Expand Down
Loading

0 comments on commit 31747ac

Please sign in to comment.