Commit 34d970f
Buffer re-use using ArrayPool and a few more checks (#4293)
* commit b468adb
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Tue Oct 1 21:19:57 2019 -0700
Fixed a bug in the unit test for image classification
commit 30aa4d1
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Tue Oct 1 20:43:17 2019 -0700
addressed Zeeshan's comments
commit 3d4f5fe
Merge: 0fbd3d2 718a238
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Tue Oct 1 20:41:21 2019 -0700
Merge branch 'master' of https://github.com/dotnet/machinelearning into ImageClassificationVBuf
commit 0fbd3d2
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Tue Oct 1 17:10:49 2019 -0700
Changed type to useImageType in LoadImages(). Changed appropriate variable names in ImageClassificationTransform.cs
commit 2417888
Merge: 3ad26b4 4944be7
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Tue Oct 1 16:55:25 2019 -0700
Merge branch 'master' of https://github.com/dotnet/machinelearning into ImageClassificationVBuf
commit 3ad26b4
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Tue Oct 1 15:59:06 2019 -0700
Added buffer re-use while reading the image in netstandard 2.0. Addressed Eric's comments. Changed ImageLoadingTransformer to take a bool type instead of a DataViewType to make it user friendly. (type = true means we are using VBuffer<byte> , type = false means we are using ImageDataViewType)
commit c67dd08
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Tue Oct 1 09:50:52 2019 -0700
Added functionality to load images as VBuffer<byte> in ImageLoader. If no DataViewType options are provided it defaults to loading images as ImageDataViewType. Made LoadImages a part of the sample in ResnetV2101TransferLearningTrainTestSplit.cs. Addressed some of the comments from Zeeshan and Yael. Added a unit test for testing the API. Added TargetFrameworks to get cross platform functionality for System.IO.Stream.Read(Span<Byte>) which doesn't work for netstandard2.0.
commit ae2ac0d
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Wed Sep 25 14:49:41 2019 -0700
Added some edits to address Yael's comments
commit b1e5739
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Wed Sep 25 13:24:03 2019 -0700
Added unit test for the change
commit acf985d
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Mon Sep 23 10:39:07 2019 -0700
Changed the calling function back to how it was in master
commit b80f7ad
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Mon Sep 23 10:20:31 2019 -0700
Added a few optimizations to re-use buffers and thereby improving performance.
commit b106ae0
Author: Harshitha Parnandi Venkata <havenka@microsoft.com>
Date: Thu Sep 19 14:07:15 2019 -0700
Changed Image Classification API to take in a VBuffer<byte> type instead of ImagePath.
* fixed merge conflicts
* Fixed some unit tests that were failing after the merge. Addressed a few comments.
* Fixed TensorFlow unit tests
* Changed the buffer re-use logic for ReadToEnd
* Changed ReadToEnd function to read using span instead of unsafe blocks
* removed unnecessary commits
* Added version check with backward compatability. Addressed Zeeshan's comments.
* Fixed tab and synced to master
* Addressed comments. Checkpoint commit
* changed the solution files and version check in ImageLoader.cs
* Added changes for StableApi.csproj
* Added ArrayPool for buffer re-use
* Handled the case when MakeGetter src is empty we need to send an empty VBuffer. Another check for handling empty images.
* Addressed comments1 parent ee743f7 commit 34d970f
File tree
6 files changed
+53
-36
lines changed- build
- docs/samples/Microsoft.ML.Samples/Dynamic/ImageClassification
- pkg/Microsoft.ML.ImageAnalytics
- src
- Microsoft.ML.Dnn
- Microsoft.ML.ImageAnalytics
6 files changed
+53
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
Lines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | 134 | | |
138 | 135 | | |
139 | 136 | | |
| |||
169 | 166 | | |
170 | 167 | | |
171 | 168 | | |
172 | | - | |
| 169 | + | |
173 | 170 | | |
174 | 171 | | |
175 | 172 | | |
| |||
194 | 191 | | |
195 | 192 | | |
196 | 193 | | |
197 | | - | |
| 194 | + | |
198 | 195 | | |
199 | 196 | | |
200 | 197 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
278 | 281 | | |
279 | 282 | | |
280 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
192 | | - | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
200 | 199 | | |
201 | 200 | | |
202 | 201 | | |
| |||
255 | 254 | | |
256 | 255 | | |
257 | 256 | | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | 257 | | |
265 | | - | |
266 | 258 | | |
267 | 259 | | |
268 | 260 | | |
269 | 261 | | |
270 | 262 | | |
271 | | - | |
272 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
276 | | - | |
277 | 275 | | |
278 | 276 | | |
279 | 277 | | |
280 | 278 | | |
281 | 279 | | |
282 | | - | |
| 280 | + | |
283 | 281 | | |
284 | 282 | | |
285 | 283 | | |
| |||
302 | 300 | | |
303 | 301 | | |
304 | 302 | | |
305 | | - | |
| 303 | + | |
306 | 304 | | |
307 | 305 | | |
308 | 306 | | |
309 | 307 | | |
310 | 308 | | |
311 | 309 | | |
312 | | - | |
| 310 | + | |
313 | 311 | | |
314 | 312 | | |
315 | 313 | | |
316 | | - | |
317 | | - | |
318 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
319 | 320 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
326 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
327 | 340 | | |
328 | 341 | | |
329 | 342 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
0 commit comments