-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
444 lines (174 loc) · 9.71 KB
/
index.html
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
<!DOCTYPE html>
<html lang="en">
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
<title>Computer Vision</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="/application.b75fd7db826474d1a95fad8a5aec65f60f4e668ee19f6012e8a4af47b191edd3.css" integrity="sha256-t1/X24JkdNGpX62KWuxl9g9OZo7hn2AS6KSvR7GR7dM=" />
<link rel="icon" type="image/png" href="/images/site/icon_hu65d76dfee5a8e0802e55f59432358110_6732567_42x0_resize_box_3.png" />
<meta property="og:url" content="http://localhost:1313/categories/computer-vision/">
<meta property="og:site_name" content="Stefano Giannini">
<meta property="og:title" content="Computer Vision">
<meta property="og:locale" content="en">
<meta property="og:type" content="website">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Computer Vision">
<script>
theme = localStorage.getItem('darkmode:color-scheme') || 'system';
if (theme == 'system') {
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
theme = 'dark';
} else {
theme = 'light';
}
}
document.documentElement.setAttribute('data-theme', theme);
</script>
</head>
<body class="type-categories kind-term" data-bs-spy="scroll" data-bs-target="#TableOfContents" data-bs-offset="80">
<div class="container-fluid bg-secondary wrapper">
<nav class="navbar navbar-expand-xl top-navbar shadow " id="top-navbar">
<div class="container">
<button class="navbar-toggler navbar-light" id="sidebar-toggler" type="button">
<i data-feather="sidebar"></i>
</button>
<a class="navbar-brand" href="/">
<img src="/images/site/icon_hu65d76dfee5a8e0802e55f59432358110_6732567_42x0_resize_box_3.png" id="logo" alt="Logo">
Stefano Giannini</a>
<button
class="navbar-toggler navbar-light"
id="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#top-nav-items"
aria-label="menu"
>
<i data-feather="menu"></i>
</button>
<div class="collapse navbar-collapse dynamic-navbar" id="top-nav-items">
<ul class="nav navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="/#home">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/#about">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/#skills">Skills</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/#experiences">Experiences</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/#education">Education</a>
</li>
<div id="top-navbar-divider"></div>
<li class="nav-item">
<a class="nav-link" id="blog-link" href="/posts">Posts</a>
</li>
<li class="nav-item">
<a class="nav-link" id="note-link" href="/notes">Notes</a>
</li>
</ul>
</div>
</div>
<img src="/images/site/icon_hu65d76dfee5a8e0802e55f59432358110_6732567_42x0_resize_box_3.png" class="d-none" id="main-logo" alt="Logo">
<img src="/images/site/icon_hu65d76dfee5a8e0802e55f59432358110_6732567_42x0_resize_box_3.png" class="d-none" id="inverted-logo" alt="Inverted Logo">
</nav>
<section class="sidebar-section" id="sidebar-section">
<div class="sidebar-holder">
<div class="sidebar" id="sidebar">
<form class="mx-auto" method="get" action="/search">
<input type="text" name="keyword" value="" placeholder="Search" data-search="" id="search-box" />
</form>
<div class="sidebar-tree">
<ul class="tree" id="tree">
<li id="list-heading"><a href="/categories" data-filter="all">Categories</a></li>
<div class="subtree taxonomy-terms">
<li><a class="taxonomy-term active" href="http://localhost:1313/categories/computer-vision/" data-taxonomy-term="computer-vision"><span class="taxonomy-label">Computer Vision</span></a></li>
<li><a class="taxonomy-term " href="http://localhost:1313/categories/finance/" data-taxonomy-term="finance"><span class="taxonomy-label">Finance</span></a></li>
<li><a class="taxonomy-term " href="http://localhost:1313/categories/nlp/" data-taxonomy-term="nlp"><span class="taxonomy-label">NLP</span></a></li>
<li><a class="taxonomy-term " href="http://localhost:1313/categories/physics/" data-taxonomy-term="physics"><span class="taxonomy-label">Physics</span></a></li>
</div>
</ul>
</div>
</div>
</div>
</section>
<section class="content-section" id="content-section">
<div class="content container-fluid" id="content">
<div class="container-fluid post-card-holder" id="post-card-holder">
<div class="post-card">
<div class="card">
<div class="card-head">
<a href="/posts/machine-learning/deep-learning/computer-vision/florence/" class="post-card-link">
<img class="card-img-top" src='/posts/machine-learning/deep-learning/computer-vision/florence/images/florence-2-lvm-computer-vision-exploration_28_3.png' alt="Hero Image">
</a>
</div>
<div class="card-body">
<a href="/posts/machine-learning/deep-learning/computer-vision/florence/" class="post-card-link">
<h5 class="card-title">Florence-2 - Vision Foundation Model - Examples</h5>
<p class="card-text post-summary">Install dependencies Type the following command to install possible needed dependencies (especially if the inference is performed on the CPU)
%pip install einops flash_attn In Kaggle, transformers and torch are already installed. Otherwise you also need to install them on your local PC.
Import Libraries from transformers import AutoProcessor, AutoModelForCausalLM from PIL import Image import requests import copy import torch %matplotlib inline Import the model We can choose Florence-2-large or Florence-2-large-ft (fine-tuned).</p>
</a>
<div class="tags">
<ul style="padding-left: 0;">
<li class="rounded"><a href="/tags/deep-learning/" class="btn btn-sm btn-info">Deep Learning</a></li>
<li class="rounded"><a href="/tags/computer-vision/" class="btn btn-sm btn-info">Computer Vision</a></li>
<li class="rounded"><a href="/tags/machine-learning/" class="btn btn-sm btn-info">Machine Learning</a></li>
</ul>
</div>
</div>
<div class="card-footer">
<span class="float-start">
Tuesday, June 25, 2024
| 5 minutes </span>
<a
href="/posts/machine-learning/deep-learning/computer-vision/florence/"
class="float-end btn btn-outline-info btn-sm">Read</a>
</div>
</div>
</div>
</div>
<div class="paginator">
</div>
</div>
</section>
</div>
<footer id="footer" class="container-fluid text-center align-content-center footer pb-2">
<div class="container pt-5">
<div class="row text-start">
</div>
</div>
<hr />
<div class="container">
<p id="disclaimer"><strong>Liability Notice:</strong> This website is done experimentally by me, taking inspiration from the open-source Toha-Hugo theme.</p>
</div>
<hr />
<div class="container">
<div class="row text-start">
<div class="col-md-4">
<a id="theme" href="https://github.com/hugo-toha/toha" target="_blank" rel="noopener">
<img src="/images/theme-logo_hu8376fd15465fef26ffe66b6bcf0ca686_13669_32x0_resize_box_3.png" alt="Toha Theme Logo">
Toha
</a>
</div>
<div class="col-md-4 text-center">© 2024 Copyright.</div>
<div class="col-md-4 text-end">
<a id="hugo" href="https://gohugo.io/" target="_blank" rel="noopener">Powered by
<img
src="/images/hugo-logo.svg"
alt="Hugo Logo"
height="18"
/>
</a>
</div>
</div>
</div>
</footer>
<script src="/application.c33df658e8710604cce1f755c3e07738d3e6f2ee5d8235ba14e7b0397d883e0a.js" integrity="sha256-wz32WOhxBgTM4fdVw+B3ONPm8u5dgjW6FOewOX2IPgo=" defer></script>
</body>
</html>
<script src="http://localhost:1313/js/copybutton.min.608f75dc2cc75e4b968d3472ab640b15b0b986a3bf6405a77c92f8eb207e1c16.js" integrity="sha256-YI913CzHXkuWjTRyq2QLFbC5hqO/ZAWnfJL46yB+HBY=" defer></script>