-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimage_process.php
executable file
·53 lines (37 loc) · 1.25 KB
/
image_process.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<p style="font-family:'monospace';font-size:10px"><strong>
<?php
include_once 'Element.php';
include_once 'EuroTraining.php';
include_once 'TrainingSet.php';
//ini_alter("display_errors", 0);
ini_set('memory_limit', '2048M');
$euro = new EuroTraining();
if(!$euro->isTrained()){
//A
$set[] = new Element('./resources/a1.png',0);
$set[] = new Element('./resources/a2.png',0);
$set[] = new Element('resources/testA.png',0);
$set[] = new Element('resources/amin.png',0);
$set[] = new Element('resources/amin2.png',0);
$set[] = new Element('resources/amin3.png',0);
$set[] = new Element('resources/a-bem-loco.jpg',0);
//B
$set[] = new Element('./resources/b1.png',1);
$set[] = new Element('./resources/b2.png',1);
$set[] = new Element('resources/testb.jpg',1);
$set[] = new Element('resources/bmin.png',1);
$set[] = new Element('resources/bmin3.png',1);
$set[] = new Element('resources/bmin2.png',1);
$trainingSet = new TrainingSet($set);
$euro->training($trainingSet);
}
$file = new Element($_FILES['image']['tmp_name']);
Element::printMatrix($file->getMatrix());
echo "<br><br>";
if($file->sumTransfer($euro->getWeights())==0){
echo "Isso parece um A";
} else {
echo "Isso parece um B";
}
?>
</strong></p>