Skip to content

Commit c7a19e3

Browse files
Update CUSTOMTRAINING.md
1 parent b0b664b commit c7a19e3

File tree

1 file changed

+9
-21
lines changed

1 file changed

+9
-21
lines changed

imageai/Prediction/CUSTOMTRAINING.md

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@ To produce a model that can perform well in practical applications, I recommend
3131
This images are the ones to be used to test the model as it trains <br>
3232
8. Once you have done this, the structure of your image dataset folder should look like below: <br> <br>
3333

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
3838
>> 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>
4443

4544
9. Then your training code goes as follows: <br> <br>
4645
<b><pre>from imageai.Prediction.Custom import ModelTraining
@@ -543,24 +542,19 @@ if(len(os.listdir(DATASET_TRAIN_DIR)) < 10):
543542
if(os.path.exists(TRAIN_ZIP_ONE) == False):
544543
print("Downloading idenprof-train1.zip")
545544
data = requests.get("https://github.com/OlafenwaMoses/IdenProf/releases/download/v1.0/idenprof-train1.zip", stream = True)
546-
547545
with open(TRAIN_ZIP_ONE, "wb") as file:
548546
shutil.copyfileobj(data.raw, file)
549547
del data
550-
551548
if (os.path.exists(TRAIN_ZIP_TWO) == False):
552549
print("Downloading idenprof-train2.zip")
553550
data = requests.get("https://github.com/OlafenwaMoses/IdenProf/releases/download/v1.0/idenprof-train2.zip", stream=True)
554-
555551
with open(TRAIN_ZIP_TWO, "wb") as file:
556552
shutil.copyfileobj(data.raw, file)
557553
del data
558-
559554
print("Extracting idenprof-train1.zip")
560555
extract1 = ZipFile(TRAIN_ZIP_ONE)
561556
extract1.extractall(DATASET_TRAIN_DIR)
562557
extract1.close()
563-
564558
print("Extracting idenprof-train2.zip")
565559
extract2 = ZipFile(TRAIN_ZIP_TWO)
566560
extract2.extractall(DATASET_TRAIN_DIR)
@@ -571,13 +565,10 @@ if(len(os.listdir(DATASET_TRAIN_DIR)) < 10):
571565
if(len(os.listdir(DATASET_TEST_DIR)) < 10):
572566
if (os.path.exists(TEST_ZIP) == False):
573567
print("Downloading idenprof-test.zip")
574-
575568
data = requests.get("https://github.com/OlafenwaMoses/IdenProf/releases/download/v1.0/idenprof-test.zip", stream=True)
576-
577569
with open(TEST_ZIP, "wb") as file:
578570
shutil.copyfileobj(data.raw, file)
579571
del data
580-
581572
print("Extracting idenprof-test.zip")
582573
extract = ZipFile(TEST_ZIP)
583574
extract.extractall(DATASET_TEST_DIR)
@@ -619,10 +610,7 @@ The <b>ModelTraining</b> class can be used to train custom models by instantiat
619610
****** initial_learning_rate(optional) , this value is used to adjust the weights generated in the network. You are advised
620611
to keep this value as it is if you don't have deep understanding of this concept. <br>
621612
****** 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>
626614
:param num_experiments: <br>
627615
:param enhance_data: <br>
628616
:param batch_size: <br>

0 commit comments

Comments
 (0)