mirror of
https://github.com/deepinsight/insightface.git
synced 2025-12-30 08:02:27 +00:00
Merge pull request #1353 from ShiquanYu/feature_ijb_eval
Fixed the problem that pfc/mxnet/evaluate/ijb.py will raise error with the model with embedding layer
This commit is contained in:
15
recognition/partial_fc/mxnet/evaluation/example.sh
Normal file → Executable file
15
recognition/partial_fc/mxnet/evaluation/example.sh
Normal file → Executable file
@@ -1,9 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# run `python ijb.py --help` for more information
|
||||
python -u ijb.py \
|
||||
--model-prefix /anxiang/opensource/model/celeb360k_final0.1/model \
|
||||
--image-path /data/anxiang/datasets/IJB_release/IJBC \
|
||||
--result-dir /anxiang/opensource/results/test \
|
||||
--model-prefix ./models/y1-cosface-glink360/model \
|
||||
--image-path /data/IJB_release/IJBC \
|
||||
--result-dir ./results/test \
|
||||
--model-epoch 0 \
|
||||
--gpu 0,1,2,3,4,5,6,7 \
|
||||
--target IJBC \
|
||||
--job cosface \
|
||||
--batch-size 256
|
||||
--job cosface \
|
||||
--batch-size 256 \
|
||||
-es 128
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ parser.add_argument('--result-dir', default='.', type=str, help='')
|
||||
parser.add_argument('--gpu', default='0', type=str, help='gpu id')
|
||||
parser.add_argument('--batch-size', default=128, type=int, help='')
|
||||
parser.add_argument('--job', default='insightface', type=str, help='job name')
|
||||
parser.add_argument('-es', '--emb-size', type=int, help='embedding size')
|
||||
parser.add_argument('--target',
|
||||
default='IJBC',
|
||||
type=str,
|
||||
@@ -123,6 +124,8 @@ def extract_parallel(prefix, epoch, dataset, batch_size, size):
|
||||
batchify_fn=batchify_fn)
|
||||
symbol, arg_params, aux_params = mx.module.module.load_checkpoint(
|
||||
prefix, epoch)
|
||||
all_layers = symbol.get_internals()
|
||||
symbol = all_layers['fc1_output']
|
||||
|
||||
# init model list
|
||||
for i in range(num_ctx):
|
||||
@@ -325,7 +328,7 @@ img_feats = extract_parallel(args.model_prefix,
|
||||
args.model_epoch,
|
||||
dataset,
|
||||
args.batch_size,
|
||||
size=512)
|
||||
size=args.emb_size)
|
||||
|
||||
faceness_scores = []
|
||||
for each_line in files:
|
||||
|
||||
Reference in New Issue
Block a user