No file with given name found
up vote
0
down vote
favorite
Facemark fm = Face.createFacemarkKazemi();
fm.loadModel("assets/face_landmark_model.dat"); <--error
build.gradle(Module:app):
sourceSets {
main {
jni.srcDirs = ['src/main/jniLibs/']
assets.srcDirs=['src/main/assets/']
} }
How fix that?
java

New contributor
bob torus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
0
down vote
favorite
Facemark fm = Face.createFacemarkKazemi();
fm.loadModel("assets/face_landmark_model.dat"); <--error
build.gradle(Module:app):
sourceSets {
main {
jni.srcDirs = ['src/main/jniLibs/']
assets.srcDirs=['src/main/assets/']
} }
How fix that?
java

New contributor
bob torus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Facemark fm = Face.createFacemarkKazemi();
fm.loadModel("assets/face_landmark_model.dat"); <--error
build.gradle(Module:app):
sourceSets {
main {
jni.srcDirs = ['src/main/jniLibs/']
assets.srcDirs=['src/main/assets/']
} }
How fix that?
java

New contributor
bob torus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Facemark fm = Face.createFacemarkKazemi();
fm.loadModel("assets/face_landmark_model.dat"); <--error
build.gradle(Module:app):
sourceSets {
main {
jni.srcDirs = ['src/main/jniLibs/']
assets.srcDirs=['src/main/assets/']
} }
How fix that?
java

java

New contributor
bob torus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
bob torus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited yesterday
New contributor
bob torus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked yesterday
bob torus
103
103
New contributor
bob torus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
bob torus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
bob torus is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
Access the file using assest manager.
AssetManager mngr = myContext.getAssets();
fm.loadModel(mngr.open("assets/face_landmark_model.dat"));
If you don't have context variable, try to create one.
Context context=getApplicationContext();
fm.loadModel(context.getAssets().open("assets/face_landmark_model.dat"));
I get "Unhandled exception: java.io.IOException" in fm.loadModel(mngr.open("assets/face_landmark_model.dat")); then I add try and catch block but again have error "No file with given name found"
– bob torus
yesterday
show me the pic of project tree structure
– Bala555
yesterday
If you create the assets folder manually, check the following link. stackoverflow.com/a/26706866/6650476
– Bala555
yesterday
update answer. Add project tree structure
– bob torus
yesterday
can u please add the stack trace and try this fm.loadModel(context.getAssets().open("face_landmark_model.dat"));
– Bala555
yesterday
|
show 1 more comment
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Access the file using assest manager.
AssetManager mngr = myContext.getAssets();
fm.loadModel(mngr.open("assets/face_landmark_model.dat"));
If you don't have context variable, try to create one.
Context context=getApplicationContext();
fm.loadModel(context.getAssets().open("assets/face_landmark_model.dat"));
I get "Unhandled exception: java.io.IOException" in fm.loadModel(mngr.open("assets/face_landmark_model.dat")); then I add try and catch block but again have error "No file with given name found"
– bob torus
yesterday
show me the pic of project tree structure
– Bala555
yesterday
If you create the assets folder manually, check the following link. stackoverflow.com/a/26706866/6650476
– Bala555
yesterday
update answer. Add project tree structure
– bob torus
yesterday
can u please add the stack trace and try this fm.loadModel(context.getAssets().open("face_landmark_model.dat"));
– Bala555
yesterday
|
show 1 more comment
up vote
1
down vote
Access the file using assest manager.
AssetManager mngr = myContext.getAssets();
fm.loadModel(mngr.open("assets/face_landmark_model.dat"));
If you don't have context variable, try to create one.
Context context=getApplicationContext();
fm.loadModel(context.getAssets().open("assets/face_landmark_model.dat"));
I get "Unhandled exception: java.io.IOException" in fm.loadModel(mngr.open("assets/face_landmark_model.dat")); then I add try and catch block but again have error "No file with given name found"
– bob torus
yesterday
show me the pic of project tree structure
– Bala555
yesterday
If you create the assets folder manually, check the following link. stackoverflow.com/a/26706866/6650476
– Bala555
yesterday
update answer. Add project tree structure
– bob torus
yesterday
can u please add the stack trace and try this fm.loadModel(context.getAssets().open("face_landmark_model.dat"));
– Bala555
yesterday
|
show 1 more comment
up vote
1
down vote
up vote
1
down vote
Access the file using assest manager.
AssetManager mngr = myContext.getAssets();
fm.loadModel(mngr.open("assets/face_landmark_model.dat"));
If you don't have context variable, try to create one.
Context context=getApplicationContext();
fm.loadModel(context.getAssets().open("assets/face_landmark_model.dat"));
Access the file using assest manager.
AssetManager mngr = myContext.getAssets();
fm.loadModel(mngr.open("assets/face_landmark_model.dat"));
If you don't have context variable, try to create one.
Context context=getApplicationContext();
fm.loadModel(context.getAssets().open("assets/face_landmark_model.dat"));
answered yesterday
Bala555
105
105
I get "Unhandled exception: java.io.IOException" in fm.loadModel(mngr.open("assets/face_landmark_model.dat")); then I add try and catch block but again have error "No file with given name found"
– bob torus
yesterday
show me the pic of project tree structure
– Bala555
yesterday
If you create the assets folder manually, check the following link. stackoverflow.com/a/26706866/6650476
– Bala555
yesterday
update answer. Add project tree structure
– bob torus
yesterday
can u please add the stack trace and try this fm.loadModel(context.getAssets().open("face_landmark_model.dat"));
– Bala555
yesterday
|
show 1 more comment
I get "Unhandled exception: java.io.IOException" in fm.loadModel(mngr.open("assets/face_landmark_model.dat")); then I add try and catch block but again have error "No file with given name found"
– bob torus
yesterday
show me the pic of project tree structure
– Bala555
yesterday
If you create the assets folder manually, check the following link. stackoverflow.com/a/26706866/6650476
– Bala555
yesterday
update answer. Add project tree structure
– bob torus
yesterday
can u please add the stack trace and try this fm.loadModel(context.getAssets().open("face_landmark_model.dat"));
– Bala555
yesterday
I get "Unhandled exception: java.io.IOException" in fm.loadModel(mngr.open("assets/face_landmark_model.dat")); then I add try and catch block but again have error "No file with given name found"
– bob torus
yesterday
I get "Unhandled exception: java.io.IOException" in fm.loadModel(mngr.open("assets/face_landmark_model.dat")); then I add try and catch block but again have error "No file with given name found"
– bob torus
yesterday
show me the pic of project tree structure
– Bala555
yesterday
show me the pic of project tree structure
– Bala555
yesterday
If you create the assets folder manually, check the following link. stackoverflow.com/a/26706866/6650476
– Bala555
yesterday
If you create the assets folder manually, check the following link. stackoverflow.com/a/26706866/6650476
– Bala555
yesterday
update answer. Add project tree structure
– bob torus
yesterday
update answer. Add project tree structure
– bob torus
yesterday
can u please add the stack trace and try this fm.loadModel(context.getAssets().open("face_landmark_model.dat"));
– Bala555
yesterday
can u please add the stack trace and try this fm.loadModel(context.getAssets().open("face_landmark_model.dat"));
– Bala555
yesterday
|
show 1 more comment
bob torus is a new contributor. Be nice, and check out our Code of Conduct.
bob torus is a new contributor. Be nice, and check out our Code of Conduct.
bob torus is a new contributor. Be nice, and check out our Code of Conduct.
bob torus is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53372653%2fno-file-with-given-name-found%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown