Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
CHILD INTELLIGENT ASSESSMENT TOOL
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2020-046
CHILD INTELLIGENT ASSESSMENT TOOL
Commits
b831a283
Commit
b831a283
authored
4 years ago
by
Buwaneka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add Classifier.java
parent
362c2e72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
0 deletions
+75
-0
Count/imageclsicifiaction/Classifier.java
Count/imageclsicifiaction/Classifier.java
+75
-0
No files found.
Count/imageclsicifiaction/Classifier.java
0 → 100644
View file @
b831a283
package
com.example.count.imageclsicifiaction
;
import
android.graphics.Bitmap
;
import
java.util.List
;
public
interface
Classifier
{
class
Recognition
{
/**
* A unique identifier for what has been recognized. Specific to the class, not the instance of
* the object.
*/
private
final
String
id
;
/**
* Display name for the recognition.
*/
private
final
String
title
;
/**
* Whether or not the model features quantized or float weights.
*/
private
final
boolean
quant
;
/**
* A sortable score for how good the recognition is relative to others. Higher should be better.
*/
private
final
Float
confidence
;
public
Recognition
(
final
String
id
,
final
String
title
,
final
Float
confidence
,
final
boolean
quant
)
{
this
.
id
=
id
;
this
.
title
=
title
;
this
.
confidence
=
confidence
;
this
.
quant
=
quant
;
}
public
String
getId
()
{
return
id
;
}
public
String
getTitle
()
{
return
title
;
}
public
Float
getConfidence
()
{
return
confidence
;
}
@Override
public
String
toString
()
{
String
resultString
=
""
;
if
(
id
!=
null
)
{
resultString
+=
"["
+
id
+
"] "
;
}
if
(
title
!=
null
)
{
resultString
+=
title
+
" "
;
}
if
(
confidence
!=
null
)
{
resultString
+=
String
.
format
(
"(%.1f%%) "
,
confidence
*
100.0f
);
}
return
resultString
.
trim
();
}
}
List
<
Recognition
>
recognizeImage
(
Bitmap
bitmap
);
void
close
();
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment