|
11 | 11 | }
|
12 | 12 | body {
|
13 | 13 | background-image: url('./static/bg_image.jpeg');
|
| 14 | + background-repeat: repeat; |
14 | 15 | }
|
| 16 | + .checkboxes label { |
| 17 | + display: block; |
| 18 | + padding-right: 10px; |
| 19 | + padding-left: 22px; |
| 20 | + text-indent: -22px; |
| 21 | + } |
| 22 | + .checkboxes input { |
| 23 | + vertical-align: middle; |
| 24 | + } |
| 25 | + .checkboxes label span { |
| 26 | + vertical-align: middle; |
| 27 | + } |
15 | 28 | </style>
|
16 | 29 |
|
17 | 30 | <!-- Bootstrap CSS -->
|
18 | 31 | <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
|
19 |
| - |
| 32 | + <br> |
20 | 33 | <title>Human Parsing Representation Extractor</title>
|
21 | 34 | </head>
|
22 | 35 | <body>
|
23 | 36 | <br>
|
24 | 37 | <h2 style="text-align:center">Upload Successful!</h2><br><br>
|
25 | 38 |
|
26 |
| - <div id="available" style="display:none"> |
| 39 | + <div id="available" style="display:block"> |
27 | 40 | <h3 style="text-align:center">Input Image</h2>
|
28 | 41 | <div align="center">
|
29 |
| - <img src="{{ inputImage }}" height="400" width="400" alt="User Input image"></div><br><br><br> |
30 |
| - <h3 style="text-align:center">Output Image</h2> |
31 |
| - <div align="center"> |
32 |
| - <img src="{{ outputImage }}" height="400" width="400" alt="Final Predicted image"><br> |
33 |
| - |
34 |
| - <br><br><br> |
35 |
| - <h3>Colour Classes</h3> |
36 |
| - <p><!-- List all classes with corresponding colour--></p> |
37 |
| - </div> |
38 |
| - <div id="unavailable" style="display:none"> |
39 |
| - <p style="text-align:center"> |
40 |
| - Some error ocurred. Kindly try again! |
41 |
| - </p> |
| 42 | + <img src="./static/input.png{{ suffix }}" height="400" width="400" alt="User Input image"></div><br><br><br> |
| 43 | + <h3 style="text-align:center">Output Images</h2><br> |
| 44 | + <div align="center"> |
| 45 | + {% if model_dict['resnet18'] %} |
| 46 | + <div class="container"> |
| 47 | + <h4> ResNet18 prediction<h4> |
| 48 | + <img src="./static/output_resnet18.jpeg{{ suffix }}" height="200" width="200" alt="Final Predicted image"><br><br> |
| 49 | + </div> |
| 50 | + {% endif %} |
| 51 | + |
| 52 | + |
| 53 | + {% if model_dict['resnet34'] %} |
| 54 | + <div class="container"> |
| 55 | + <h4> ResNet34 prediction<h4> |
| 56 | + <img src="./static/output_resnet34.jpeg{{ suffix }}" height="200" width="200" alt="Final Predicted image"><br><br> |
| 57 | + </div> |
| 58 | + {% endif %} |
| 59 | + |
| 60 | + |
| 61 | + {% if model_dict['resnet50'] %} |
| 62 | + <div class="container"> |
| 63 | + <h4> ResNet50 prediction<h4> |
| 64 | + <img src="./static/output_resnet50.jpeg{{ suffix }}" height="200" width="200" alt="Final Predicted image"><br><br> |
| 65 | + </div> |
| 66 | + {% endif %} |
| 67 | + |
| 68 | + |
| 69 | + {% if model_dict['resnet101'] %} |
| 70 | + <div class="container"> |
| 71 | + <h4> ResNet101 prediction<h4> |
| 72 | + <img src="./static/output_resnet101.jpeg{{ suffix }}" height="200" width="200" alt="Final Predicted image"><br><br> |
| 73 | + </div> |
| 74 | + {% endif %} |
| 75 | + |
| 76 | + |
| 77 | + {% if model_dict['resnet152'] %} |
| 78 | + <div class="container"> |
| 79 | + <h4> ResNet152 prediction<h4> |
| 80 | + <img src="./static/output_resnet152.jpeg{{ suffix }}" height="200" width="200" alt="Final Predicted image"><br><br> |
| 81 | + </div> |
| 82 | + {% endif %} |
| 83 | + |
| 84 | + |
| 85 | + {% if model_dict['densenet'] %} |
| 86 | + <div class="container"> |
| 87 | + <h4> DenseNet prediction<h4> |
| 88 | + <img src="./static/output_densenet.jpeg{{ suffix }}" height="200" width="200" alt="Final Predicted image"><br><br> |
| 89 | + </div> |
| 90 | + {% endif %} |
42 | 91 | </div>
|
| 92 | + |
43 | 93 | <br>
|
44 | 94 | <div class="text-center">
|
45 | 95 | <a class="btn btn-primary text-center" href="/" role="button">Go back</a><br><br>
|
46 | 96 | </div>
|
47 |
| - <script type="text/javascript"> |
48 |
| - fetch('./static/output.png', { method: 'HEAD' }) |
49 |
| - .then(res => { |
50 |
| - if (res.ok) { |
51 |
| - fetch('./static/input.png', { method: 'HEAD' }) |
52 |
| - .then(res => { |
53 |
| - if (res.ok) { |
54 |
| - document.getElementById('available').style.display = "block"; |
55 |
| - document.getElementById('unavailable').style.display = "none"; |
56 |
| - } else { |
57 |
| - alert("Input image is unavailable!") |
58 |
| - document.getElementById('unavailable').style.display = "block"; |
59 |
| - document.getElementById('available').style.display = "none"; |
60 |
| - } |
61 |
| - }).catch(err => alert('Error:', err)); |
62 |
| - } else { |
63 |
| - alert("Output image is unavailable!") |
64 |
| - document.getElementById('unavailable').style.display = "block"; |
65 |
| - document.getElementById('available').style.display = "none"; |
66 |
| - } |
67 |
| - }).catch(err => alert('Error:', err)); |
68 |
| - </script> |
69 |
| - |
70 | 97 |
|
71 | 98 | <!-- Option 1: Bootstrap Bundle with Popper -->
|
72 | 99 | <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
|
|
0 commit comments