with viewer, unmatched face now has img data / thumbnail, so we know what it really looks like when we choose to override - still major WIP, tables.sql also has some override types, but not convinced I have design yet
This commit is contained in:
@@ -204,8 +204,8 @@ $(document).ready( function()
|
||||
|
||||
$.contextMenu({
|
||||
selector: '#canvas',
|
||||
// trigger: 'left',
|
||||
trigger: 'none',
|
||||
trigger: 'left',
|
||||
// trigger: 'none',
|
||||
hideOnSecondTrigger: true,
|
||||
|
||||
build: function($triggerElement, e) {
|
||||
@@ -226,16 +226,16 @@ $(document).ready( function()
|
||||
if( x >= fx && x <= fx+fw && y >= fy && y <= fy+fh )
|
||||
{
|
||||
if( objs[current].faces[i].who )
|
||||
item_list['match']={ 'name': objs[current].faces[i].who, 'which_face': i }
|
||||
item_list['match']={ 'name': objs[current].faces[i].who, 'which_face': i, 'id': objs[current].faces[i].id }
|
||||
else
|
||||
{
|
||||
item_list['no_match_new_person']={ 'name': 'Add as reference image to NEW person', 'which_face': i }
|
||||
item_list['no_match_new_refimg']={ 'name': 'Add as reference image to EXISTING person', 'which_face': i }
|
||||
item_list['no_match_override_match']={ 'name': 'Manually match to existing person', 'which_face': i }
|
||||
item_list['no_match_no_face']={ 'name': 'Mark as not a face', 'which_face': i }
|
||||
item_list['no_match_too_young']={ 'name': 'Mark as face too young', 'which_face': i }
|
||||
item_list['no_match_ignore']={ 'name': 'Ignore this face', 'which_face': i }
|
||||
item_list['remove_override']={ 'name': 'Remove override for this face', 'which_face': i }
|
||||
item_list['no_match_new_person']={ 'name': 'Add as reference image to NEW person', 'which_face': i, 'id': objs[current].faces[i].id }
|
||||
item_list['no_match_new_refimg']={ 'name': 'Add as reference image to EXISTING person', 'which_face': i, 'id': objs[current].faces[i].id }
|
||||
item_list['no_match_override_match']={ 'name': 'Manually match to existing person', 'which_face': i, 'id': objs[current].faces[i].id }
|
||||
item_list['no_match_no_face']={ 'name': 'Mark as not a face', 'which_face': i, 'id': objs[current].faces[i].id }
|
||||
item_list['no_match_too_young']={ 'name': 'Mark as face too young', 'which_face': i, 'id': objs[current].faces[i].id }
|
||||
item_list['no_match_ignore']={ 'name': 'Ignore this face', 'which_face': i, 'id': objs[current].faces[i].id }
|
||||
item_list['remove_override']={ 'name': 'Remove override for this face', 'which_face': i, 'id': objs[current].faces[i].id }
|
||||
}
|
||||
delete item_list['not_a_face']
|
||||
$('#canvas').prop('menu_item', item_list )
|
||||
@@ -258,7 +258,13 @@ $(document).ready( function()
|
||||
function FaceDBox(key, item)
|
||||
{
|
||||
div ='<p>'
|
||||
div+='Face #' + item[key]['which_face']
|
||||
div+='Face position #' + item[key]['which_face']
|
||||
div+='<div id="face_img"></div>'
|
||||
$.ajax({ type: 'POST', data: null, url: '/get_face_from_image/'+item[key]['id'],
|
||||
success: function(img_data) {
|
||||
$('#face_img').html( '<img src="data:image/jpeg;base64,' + img_data + '"></img>' )
|
||||
}
|
||||
} )
|
||||
div+='</p>'
|
||||
if ( key == 'no_match_new_person' )
|
||||
{
|
||||
@@ -266,11 +272,18 @@ function FaceDBox(key, item)
|
||||
}
|
||||
if ( key == 'no_match_new_refimg' || key == 'no_match_override_match' )
|
||||
{
|
||||
div+='<br>search for existing person'
|
||||
div+='<h5>search for existing person:</h5>'
|
||||
div+=
|
||||
`
|
||||
<div class="input-group mb-3"><input type="text" class="form-control" id="stext" placeholder="tag/name">
|
||||
<button class="btn btn-outline-success" type="button" onClick="console.log('search for: ' + $('#stext').val());return false">Search</button>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
if ( key == 'no_match_no_face' || key == 'no_match_too_young' || key == 'no_match_ignore' )
|
||||
{
|
||||
div+='<br>just track this against face#' + item[key]['which_face']
|
||||
div+='<br>face db id: ' + item[key]['id']
|
||||
}
|
||||
$('#dbox-title').html(item[key]['name'])
|
||||
$('#dbox-content').html(div)
|
||||
|
||||
Reference in New Issue
Block a user