We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The value of optModelUrls is “ftp://47.114.1.215”,Failed to load model
Use FTP to load model successfully
Exception in thread "main" ai.djl.repository.zoo.ModelNotFoundException: No matching model with specified Input/Output type found.
url:https://github.com/aws-samples/djl-demo/blob/master/pneumonia-detection/README.md
package com.tensorflow.common.staticvoidmainTest; import ai.djl.Application; import ai.djl.ModelException; import ai.djl.inference.Predictor; import ai.djl.modality.Classifications; import ai.djl.modality.cv.Image; import ai.djl.modality.cv.ImageFactory; import ai.djl.modality.cv.translator.ImageClassificationTranslator; import ai.djl.modality.cv.util.NDImageUtils; import ai.djl.repository.zoo.Criteria; import ai.djl.repository.zoo.ModelZoo; import ai.djl.repository.zoo.ZooModel; import ai.djl.training.util.ProgressBar; import ai.djl.translate.TranslateException; import ai.djl.translate.Translator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Arrays; import java.util.List; public class PneumoniaDetection { private static final Logger logger = LoggerFactory.getLogger(PneumoniaDetection.class); private static final List<String> CLASSES = Arrays.asList("正常", "肺炎"); public static void main(String[] args) throws IOException, TranslateException, ModelException { Path imagePath = Paths.get("tensorflow/src/test/resources/test.jpg"); Image image = ImageFactory.getInstance().fromFile(imagePath); Translator<Image, Classifications> translator = ImageClassificationTranslator.builder() .addTransform(a -> NDImageUtils.resize(a, 224).div(255.0f)) .optSynset(CLASSES) .build(); Criteria<Image, Classifications> criteria = Criteria.builder() .optApplication(Application.CV.IMAGE_CLASSIFICATION) .setTypes(Image.class, Classifications.class) .optModelUrls("ftp://test:zw123456@47.114.1.215") .optTranslator(translator) .optProgress(new ProgressBar()) .build(); try (ZooModel<Image, Classifications> model = ModelZoo.loadModel(criteria); Predictor<Image, Classifications> predictor = model.newPredictor()) { Classifications result = predictor.predict(image); logger.info("预测结果: {}", result); } } }
windows10 x64 engine:tensorflow-native-cpu-2.3.0
The text was updated successfully, but these errors were encountered:
Fixes deepjavalibrary#484, support arbitary URL scheme for repository
da69344
Change-Id: Idffb89945aef3eb191c3e005e84f1b7a9820ea1b
6c26228
Add tests for stable-diffusion-2-1-base model (deepjavalibrary#484)
2f4f8b5
frankfliu
No branches or pull requests
Description
The value of optModelUrls is “ftp://47.114.1.215”,Failed to load model
Expected Behavior
Use FTP to load model successfully
Error Message
How to Reproduce?
url:https://github.com/aws-samples/djl-demo/blob/master/pneumonia-detection/README.md
What have you tried to solve it?
Environment Info
windows10 x64
engine:tensorflow-native-cpu-2.3.0
The text was updated successfully, but these errors were encountered: