Coredata Programming - core-data

I am newer to core data programming. Can anyone help me on the following issue.
I have created a object model wit 4 attributes in 1 entity. image name ,image coordinates,text, features.
And set all value to database, and i got all objects from array . Actually i need to compare the current image with database image. If exist i need to load all values from database ie, image name . image coordinates, text , and features to relevant loaded image. How do I compare self.image with images in the database.
Actually i am storing all url of the image to database,. How do i compare with self.image url and image url in the database , and load all values in to current view,.
Please help me.
Thanks in advance

Related

Table data extraction using Form Recogniser

I am trying to extract table data by training different table layout structures. But once the training is completed I am not able to fetch the table data if I am trying to analyze a new file which has a different layout. Is it a limitation from Azure cognitive services.
Was the table extracted automatically and appears in the pageResults section of the JSON output or has a small table icon near it in the UX ? If you are labeling tables and training on tables is your training data all documents from the same format and layout ? If not you should create a model per document type (same format and layout) and then compose all the models together to a single model.
This is something that you can tryout with the Konfuzio SDK
to get you started:
# pip install konfuzio_sdk
# in the working directory
# konfuzio_sdk init
from konfuzio_sdk.api import get_results_from_segmentation
result = get_results_from_segmentation(doc_id=1111, project_id=111)
# result contains the elements per page
tables_first_page = [r for r in result[0] if r['label'] == 'table']
Create a free account here and upload your training data
https://github.com/konfuzio-ai/document-ai-python-sdk/issues/24

How do I check if a fabric Object is a video?

Fabricjs seems to use fabric.Image to create both an image or a video. In multiple use cases if I'm getting some fabric object, through an event, or looping through the fabric canvas, I need to differentiate if that object is an image or a video. If I use fabricObject.type I will get "image" type for both the video object and the image object. Is there some other property I can check to determine which is which? Perhaps there is a way to add metaData to the fabric.Object to help differentiate objects.
Ok, so I found out that I can use the data field inside a fabric object to store any type of data I want, without fabric messing with it. This will help immensely and I've tested that it works.

CoreData - inconsistent model with an association that doesn't exist

I'm trying to figure out a user's crash they're experiencing on their device. I have a post model that has-one image, with the delete-rule rule set to nullify. Trying to access post.image results in NSObjectInaccessibleException. If I look at the sqlite database backing it, the post row references an image with id 11, but that particular row doesn't exist in the corresponding images table. (There is an image with id=12, so presumably the one with id=11 did exist at some point...)
I'm struggling to see how this might have occurred - any guesses at scenarios that can result in an association not getting cleaned up?

MongoDB - basic data design

I have a list of Google map markers that I'm associating images with. Each marker can have multiple images\video's and each image can be thumbnailed to multiple sizes.
eg. I have markerID 555
I'm storing the images in GridFS and add MarkerID and Thumbnail Size as MetaData properties.
To get a list of images for a given marker I simply search the fs.files collection as follows.
{"metadata.size": imageSize, "metadata.markerID": markerID }
Is there anything wrong with this approach?
As long as you have index on the search criteria and enough RAM to hold all the index in memory, you should be ok with that.
Please note that in your example above, you need a compound index, see Mongo Docs for more information about mongo indexes.

Store image in core data

I want to store image for every employee while updating their records. How can I do that?
I have a dictionary storing name, id and department of employees. Now i want the image to be saved together.
Core Data supports the "Binary Data" type - When you define a model with a Binary Data field, it creates your model class with an NSData field. You can move an image into the NSData field, and CoreData will save it for you.
You can then use UIImage initWithData: to load the image from the NSData field.
Hope this helps !
For strore image as CoreDate attribute need:
Add transformable attribute and set transformer with own class
Implement ImageToDataTransformer
See here for an example http://www.iphonedevsdk.com/forum/181656-post3.html

Resources