@@ -31,16 +31,15 @@ To produce a model that can perform well in practical applications, I recommend
31
31
This images are the ones to be used to test the model as it trains <br >
32
32
8 . Once you have done this, the structure of your image dataset folder should look like below: <br > <br >
33
33
34
- <b ><pre >pets >>
35
- train >> dog >> dog_train_images
36
- >> cat >> cat_train_images
37
- >> squirrel >> squirrel_train_images
34
+ <b ><pre >pets >
35
+ train >> dog >>> dog_train_images
36
+ >> cat >>> cat_train_images
37
+ >> squirrel >>> squirrel_train_images
38
38
>> snake >> snake_train_images
39
-
40
- test >> dog >> dog_test_images
41
- >> cat >> cat_test_images
42
- >> squirrel >> squirrel_test_images
43
- >> snake >> snake_test_images</pre></b>
39
+ test >> dog >>> dog_test_images
40
+ >> cat >>> cat_test_images
41
+ >> squirrel >>> squirrel_test_images
42
+ >> snake >>> snake_test_images</pre ></b >
44
43
45
44
9 . Then your training code goes as follows: <br > <br >
46
45
<b ><pre >from imageai.Prediction.Custom import ModelTraining
@@ -543,24 +542,19 @@ if(len(os.listdir(DATASET_TRAIN_DIR)) < 10):
543
542
if(os.path.exists(TRAIN_ZIP_ONE) == False):
544
543
print("Downloading idenprof-train1.zip")
545
544
data = requests.get("https://github.com/OlafenwaMoses/IdenProf/releases/download/v1.0/idenprof-train1.zip ", stream = True)
546
-
547
545
with open(TRAIN_ZIP_ONE, "wb") as file:
548
546
shutil.copyfileobj(data.raw, file)
549
547
del data
550
-
551
548
if (os.path.exists(TRAIN_ZIP_TWO) == False):
552
549
print("Downloading idenprof-train2.zip")
553
550
data = requests.get("https://github.com/OlafenwaMoses/IdenProf/releases/download/v1.0/idenprof-train2.zip ", stream=True)
554
-
555
551
with open(TRAIN_ZIP_TWO, "wb") as file:
556
552
shutil.copyfileobj(data.raw, file)
557
553
del data
558
-
559
554
print("Extracting idenprof-train1.zip")
560
555
extract1 = ZipFile(TRAIN_ZIP_ONE)
561
556
extract1.extractall(DATASET_TRAIN_DIR)
562
557
extract1.close()
563
-
564
558
print("Extracting idenprof-train2.zip")
565
559
extract2 = ZipFile(TRAIN_ZIP_TWO)
566
560
extract2.extractall(DATASET_TRAIN_DIR)
@@ -571,13 +565,10 @@ if(len(os.listdir(DATASET_TRAIN_DIR)) < 10):
571
565
if(len(os.listdir(DATASET_TEST_DIR)) < 10):
572
566
if (os.path.exists(TEST_ZIP) == False):
573
567
print("Downloading idenprof-test.zip")
574
-
575
568
data = requests.get("https://github.com/OlafenwaMoses/IdenProf/releases/download/v1.0/idenprof-test.zip ", stream=True)
576
-
577
569
with open(TEST_ZIP, "wb") as file:
578
570
shutil.copyfileobj(data.raw, file)
579
571
del data
580
-
581
572
print("Extracting idenprof-test.zip")
582
573
extract = ZipFile(TEST_ZIP)
583
574
extract.extractall(DATASET_TEST_DIR)
@@ -619,10 +610,7 @@ The <b>ModelTraining</b> class can be used to train custom models by instantiat
619
610
***** * initial_learning_rate(optional) , this value is used to adjust the weights generated in the network. You are advised
620
611
to keep this value as it is if you don't have deep understanding of this concept. <br >
621
612
***** * show_network_summary(optional) , this value is used to show the structure of the network should you desire to see it.
622
- Itis set to False by default <br > <br >
623
-
624
-
625
- :param num_objects: <br>
613
+ Itis set to False by default <br > <br >: param num_objects: <br >
626
614
: param num_experiments: <br >
627
615
: param enhance_data: <br >
628
616
: param batch_size: <br >
0 commit comments