-
Notifications
You must be signed in to change notification settings - Fork 3
✨ Add support for all utility models #301
New issue
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
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c8175dc
add classification classes
ianardee b00398f
update polygon printing
ianardee d720d68
add crop classes
ianardee 0975f89
add OCR classes
ianardee cfbd000
add Split classes
ianardee 2c5c6b8
add post slug to v2 parameters
ianardee c7c941c
update test resources
ianardee 5e93607
use annotation for product slugs
ianardee 36fbe6a
add utility calls
ianardee fb6b874
enable annotation processor
ianardee b9743d8
update gitignore
ianardee ae3d926
fix for java 8
ianardee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| import com.mindee.MindeeClientV2; | ||
| import com.mindee.input.LocalInputSource; | ||
| import com.mindee.v2.product.classification.ClassificationClassifier; | ||
| import com.mindee.v2.product.classification.ClassificationResponse; | ||
| import com.mindee.v2.product.classification.ClassificationResult; | ||
| import com.mindee.v2.product.classification.params.ClassificationParameters; | ||
| import java.io.File; | ||
| import java.io.IOException; | ||
|
|
||
| public class SimpleMindeeClientV2 { | ||
|
|
||
| public static void main(String[] args) | ||
| throws IOException, InterruptedException | ||
| { | ||
| String apiKey = "MY_API_KEY"; | ||
| String filePath = "/path/to/the/file.ext"; | ||
| String modelId = "MY_MODEL_ID"; | ||
|
|
||
| // Init a new client | ||
| MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey); | ||
|
|
||
| // Set inference parameters | ||
| // Note: modelId is mandatory. | ||
| ClassificationParameters classificationParams = ClassificationParameters | ||
| // ID of the model, required. | ||
| .builder(modelId) | ||
| .build(); | ||
|
|
||
| // Load a file from disk | ||
| LocalInputSource inputSource = new LocalInputSource(filePath); | ||
|
|
||
| // Send for processing | ||
| ClassificationResponse response = mindeeClient.enqueueAndGetResult( | ||
| ClassificationResponse.class, | ||
| inputSource, | ||
| classificationParams | ||
| ); | ||
|
|
||
| // Print a summary of the response | ||
| System.out.println(response.getInference().toString()); | ||
|
|
||
| // Access the classification result | ||
| ClassificationResult result = response.getInference().getResult(); | ||
| ClassificationClassifier classification = result.getClassification(); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import com.mindee.MindeeClientV2; | ||
| import com.mindee.input.LocalInputSource; | ||
| import com.mindee.v2.product.crop.CropResponse; | ||
| import com.mindee.v2.product.crop.CropResult; | ||
| import com.mindee.v2.product.crop.params.CropParameters; | ||
| import java.io.File; | ||
| import java.io.IOException; | ||
|
|
||
| public class SimpleMindeeClientV2 { | ||
|
|
||
| public static void main(String[] args) | ||
| throws IOException, InterruptedException | ||
| { | ||
| String apiKey = "MY_API_KEY"; | ||
| String filePath = "/path/to/the/file.ext"; | ||
| String modelId = "MY_MODEL_ID"; | ||
|
|
||
| // Init a new client | ||
| MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey); | ||
|
|
||
| // Set inference parameters | ||
| // Note: modelId is mandatory. | ||
| CropParameters cropParams = CropParameters | ||
| // ID of the model, required. | ||
| .builder(modelId) | ||
| .build(); | ||
|
|
||
| // Load a file from disk | ||
| LocalInputSource inputSource = new LocalInputSource(filePath); | ||
|
|
||
| // Send for processing | ||
| CropResponse response = mindeeClient.enqueueAndGetResult( | ||
| CropResponse.class, | ||
| inputSource, | ||
| cropParams | ||
| ); | ||
|
|
||
| // Print a summary of the response | ||
| System.out.println(response.getInference().toString()); | ||
|
|
||
| // Access the crop results | ||
| CropResult result = response.getInference().getResult(); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import com.mindee.MindeeClientV2; | ||
| import com.mindee.input.LocalInputSource; | ||
| import com.mindee.v2.product.ocr.OcrResponse; | ||
| import com.mindee.v2.product.ocr.OcrResult; | ||
| import com.mindee.v2.product.ocr.params.OcrParameters; | ||
| import java.io.File; | ||
| import java.io.IOException; | ||
|
|
||
| public class SimpleMindeeClientV2 { | ||
|
|
||
| public static void main(String[] args) | ||
| throws IOException, InterruptedException | ||
| { | ||
| String apiKey = "MY_API_KEY"; | ||
| String filePath = "/path/to/the/file.ext"; | ||
| String modelId = "MY_MODEL_ID"; | ||
|
|
||
| // Init a new client | ||
| MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey); | ||
|
|
||
| // Set inference parameters | ||
| // Note: modelId is mandatory. | ||
| OcrParameters ocrParams = OcrParameters | ||
| // ID of the model, required. | ||
| .builder(modelId) | ||
| .build(); | ||
|
|
||
| // Load a file from disk | ||
| LocalInputSource inputSource = new LocalInputSource(filePath); | ||
|
|
||
| // Send for processing | ||
| OcrResponse response = mindeeClient.enqueueAndGetResult( | ||
| OcrResponse.class, | ||
| inputSource, | ||
| ocrParams | ||
| ); | ||
|
|
||
| // Print a summary of the response | ||
| System.out.println(response.getInference().toString()); | ||
|
|
||
| // Access the result OCR pages | ||
| OcrResult result = response.getInference().getResult(); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import com.mindee.MindeeClientV2; | ||
| import com.mindee.input.LocalInputSource; | ||
| import com.mindee.v2.product.split.SplitResponse; | ||
| import com.mindee.v2.product.split.SplitResult; | ||
| import com.mindee.v2.product.split.params.SplitParameters; | ||
| import java.io.File; | ||
| import java.io.IOException; | ||
|
|
||
| public class SimpleMindeeClientV2 { | ||
|
|
||
| public static void main(String[] args) | ||
| throws IOException, InterruptedException | ||
| { | ||
| String apiKey = "MY_API_KEY"; | ||
| String filePath = "/path/to/the/file.ext"; | ||
| String modelId = "MY_MODEL_ID"; | ||
|
|
||
| // Init a new client | ||
| MindeeClientV2 mindeeClient = new MindeeClientV2(apiKey); | ||
|
|
||
| // Set inference parameters | ||
| // Note: modelId is mandatory. | ||
| SplitParameters splitParams = SplitParameters | ||
| // ID of the model, required. | ||
| .builder(modelId) | ||
| .build(); | ||
|
|
||
| // Load a file from disk | ||
| LocalInputSource inputSource = new LocalInputSource(filePath); | ||
|
|
||
| // Send for processing | ||
| SplitResponse response = mindeeClient.enqueueAndGetResult( | ||
| SplitResponse.class, | ||
| inputSource, | ||
| splitParams | ||
| ); | ||
|
|
||
| // Print a summary of the response | ||
| System.out.println(response.getInference().toString()); | ||
|
|
||
| // Access the split result | ||
| SplitResult result = response.getInference().getResult(); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.