Skip to content

Commit ee4ab3c

Browse files
Update doc
1 parent cf4752a commit ee4ab3c

27 files changed

+1235
-111
lines changed

book/404.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<!-- Book generated using mdBook -->
55
<meta charset="UTF-8">
6-
<title>Page not found - DD-Ranking Benchmark</title>
6+
<title>Page not found - DD-Ranking API Documentation</title>
77
<base href="/">
88

99

@@ -123,7 +123,7 @@
123123
</button>
124124
</div>
125125

126-
<h1 class="menu-title">DD-Ranking Benchmark</h1>
126+
<h1 class="menu-title">DD-Ranking API Documentation</h1>
127127

128128
<div class="right-buttons">
129129
<a href="print.html" title="Print this book" aria-label="Print this book">

book/augmentations/cutmix.html

Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
<!DOCTYPE HTML>
2+
<html lang="en" class="light sidebar-visible" dir="ltr">
3+
<head>
4+
<!-- Book generated using mdBook -->
5+
<meta charset="UTF-8">
6+
<title>CutMix - DD-Ranking API Documentation</title>
7+
8+
9+
<!-- Custom HTML head -->
10+
11+
<meta name="description" content="">
12+
<meta name="viewport" content="width=device-width, initial-scale=1">
13+
<meta name="theme-color" content="#ffffff">
14+
15+
<link rel="icon" href="../favicon.svg">
16+
<link rel="shortcut icon" href="../favicon.png">
17+
<link rel="stylesheet" href="../css/variables.css">
18+
<link rel="stylesheet" href="../css/general.css">
19+
<link rel="stylesheet" href="../css/chrome.css">
20+
<link rel="stylesheet" href="../css/print.css" media="print">
21+
22+
<!-- Fonts -->
23+
<link rel="stylesheet" href="../FontAwesome/css/font-awesome.css">
24+
<link rel="stylesheet" href="../fonts/fonts.css">
25+
26+
<!-- Highlight.js Stylesheets -->
27+
<link rel="stylesheet" href="../highlight.css">
28+
<link rel="stylesheet" href="../tomorrow-night.css">
29+
<link rel="stylesheet" href="../ayu-highlight.css">
30+
31+
<!-- Custom theme stylesheets -->
32+
33+
<!-- MathJax -->
34+
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
35+
36+
<!-- Provide site root to javascript -->
37+
<script>
38+
var path_to_root = "../";
39+
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
40+
</script>
41+
<!-- Start loading toc.js asap -->
42+
<script src="../toc.js"></script>
43+
</head>
44+
<body>
45+
<div id="body-container">
46+
<!-- Work around some values being stored in localStorage wrapped in quotes -->
47+
<script>
48+
try {
49+
var theme = localStorage.getItem('mdbook-theme');
50+
var sidebar = localStorage.getItem('mdbook-sidebar');
51+
52+
if (theme.startsWith('"') && theme.endsWith('"')) {
53+
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
54+
}
55+
56+
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
57+
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
58+
}
59+
} catch (e) { }
60+
</script>
61+
62+
<!-- Set the theme before any content is loaded, prevents flash -->
63+
<script>
64+
var theme;
65+
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
66+
if (theme === null || theme === undefined) { theme = default_theme; }
67+
const html = document.documentElement;
68+
html.classList.remove('light')
69+
html.classList.add(theme);
70+
html.classList.add("js");
71+
</script>
72+
73+
<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
74+
75+
<!-- Hide / unhide sidebar before it is displayed -->
76+
<script>
77+
var sidebar = null;
78+
var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
79+
if (document.body.clientWidth >= 1080) {
80+
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
81+
sidebar = sidebar || 'visible';
82+
} else {
83+
sidebar = 'hidden';
84+
}
85+
sidebar_toggle.checked = sidebar === 'visible';
86+
html.classList.remove('sidebar-visible');
87+
html.classList.add("sidebar-" + sidebar);
88+
</script>
89+
90+
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
91+
<!-- populated by js -->
92+
<mdbook-sidebar-scrollbox class="sidebar-scrollbox"></mdbook-sidebar-scrollbox>
93+
<noscript>
94+
<iframe class="sidebar-iframe-outer" src="../toc.html"></iframe>
95+
</noscript>
96+
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
97+
<div class="sidebar-resize-indicator"></div>
98+
</div>
99+
</nav>
100+
101+
<div id="page-wrapper" class="page-wrapper">
102+
103+
<div class="page">
104+
<div id="menu-bar-hover-placeholder"></div>
105+
<div id="menu-bar" class="menu-bar sticky">
106+
<div class="left-buttons">
107+
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
108+
<i class="fa fa-bars"></i>
109+
</label>
110+
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
111+
<i class="fa fa-paint-brush"></i>
112+
</button>
113+
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
114+
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
115+
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
116+
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
117+
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
118+
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
119+
</ul>
120+
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
121+
<i class="fa fa-search"></i>
122+
</button>
123+
</div>
124+
125+
<h1 class="menu-title">DD-Ranking API Documentation</h1>
126+
127+
<div class="right-buttons">
128+
<a href="../print.html" title="Print this book" aria-label="Print this book">
129+
<i id="print-button" class="fa fa-print"></i>
130+
</a>
131+
132+
</div>
133+
</div>
134+
135+
<div id="search-wrapper" class="hidden">
136+
<form id="searchbar-outer" class="searchbar-outer">
137+
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
138+
</form>
139+
<div id="searchresults-outer" class="searchresults-outer hidden">
140+
<div id="searchresults-header" class="searchresults-header"></div>
141+
<ul id="searchresults">
142+
</ul>
143+
</div>
144+
</div>
145+
146+
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
147+
<script>
148+
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
149+
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
150+
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
151+
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
152+
});
153+
</script>
154+
155+
<div id="content" class="content">
156+
<main>
157+
<h2 id="cutmix"><a class="header" href="#cutmix">Cutmix</a></h2>
158+
<p>Cutmix is a data augmentation technique that creates new samples by combining patches from two images while blending their labels proportionally to the area of the patches.. We follow the implementation of cutmix in <a href="https://github.com/VILA-Lab/SRe2L/tree/main/SRe2L">SRe2L</a>.</p>
159+
<div style="background-color:#F7F7F7; padding:15px; border:1px solid #E0E0E0; border-top:3px solid #FF0000; font-family:monospace; font-size:14px;">
160+
<p><span style="color:#FF6B00;">CLASS</span>
161+
dd_ranking.aug.Cutmix(params: dict)
162+
<a href="https://github.com/NUS-HPC-AI-Lab/DD-Ranking/blob/main/dd_ranking/aug/cutmix.py"><strong>[SOURCE]</strong></a></p>
163+
</div>
164+
<h3 id="parameters"><a class="header" href="#parameters">Parameters</a></h3>
165+
<ul>
166+
<li><strong>params</strong>(<span style="color:#FF6B00;">dict</span>): Parameters for the cutmix augmentation. We require the parameters to be in the format of <code>{'param_name': param_value}</code>. For cutmix, only <code>beta</code> (beta distribution parameter) needs to be specified, e.g. <code>{'beta': 1.0}</code>.</li>
167+
</ul>
168+
<h3 id="example"><a class="header" href="#example">Example</a></h3>
169+
<pre><code class="language-python"># When intializing an evaluator with cutmix augmentation, and cutmix object will be constructed.
170+
&gt;&gt;&gt; self.aug_func = Cutmix(params={'beta': 1.0})
171+
172+
# During training, the cutmix object will be used to augment the data.
173+
&gt;&gt;&gt; images = aug_func(images)
174+
</code></pre>
175+
176+
</main>
177+
178+
<nav class="nav-wrapper" aria-label="Page navigation">
179+
<!-- Mobile navigation buttons -->
180+
<a rel="prev" href="../augmentations/dsa.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
181+
<i class="fa fa-angle-left"></i>
182+
</a>
183+
184+
<a rel="next prefetch" href="../augmentations/mixup.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
185+
<i class="fa fa-angle-right"></i>
186+
</a>
187+
188+
<div style="clear: both"></div>
189+
</nav>
190+
</div>
191+
</div>
192+
193+
<nav class="nav-wide-wrapper" aria-label="Page navigation">
194+
<a rel="prev" href="../augmentations/dsa.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
195+
<i class="fa fa-angle-left"></i>
196+
</a>
197+
198+
<a rel="next prefetch" href="../augmentations/mixup.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
199+
<i class="fa fa-angle-right"></i>
200+
</a>
201+
</nav>
202+
203+
</div>
204+
205+
<!-- Livereload script (if served using the cli tool) -->
206+
<script>
207+
const wsProtocol = location.protocol === 'https:' ? 'wss:' : 'ws:';
208+
const wsAddress = wsProtocol + "//" + location.host + "/" + "__livereload";
209+
const socket = new WebSocket(wsAddress);
210+
socket.onmessage = function (event) {
211+
if (event.data === "reload") {
212+
socket.close();
213+
location.reload();
214+
}
215+
};
216+
217+
window.onbeforeunload = function() {
218+
socket.close();
219+
}
220+
</script>
221+
222+
223+
224+
<script>
225+
window.playground_copyable = true;
226+
</script>
227+
228+
229+
<script src="../elasticlunr.min.js"></script>
230+
<script src="../mark.min.js"></script>
231+
<script src="../searcher.js"></script>
232+
233+
<script src="../clipboard.min.js"></script>
234+
<script src="../highlight.js"></script>
235+
<script src="../book.js"></script>
236+
237+
<!-- Custom JS scripts -->
238+
239+
240+
</div>
241+
</body>
242+
</html>

0 commit comments

Comments
 (0)