Structured Data Schema Types for Trading Card Game Cards - schema

So, I run a website which has a card database for the old Star Wars Trading Card Game by Wizards of the Coast. swtcg.com There are multiple sets/expansions and each of those has multiple cards.
If you google other trading card games like Magic the Gathering or Pokemon TCG, you SOMETIMES will get rich, carousel-style results for individual cards, and if you click one of the cards, you get the rich, graph sidebar result. It seems like google is aware that these are Cards from Sets for a Trading Card Game.
I have tried to search for sites that are using structured data to identify these types, but have only found one or two, and they are just using Product markup.
Does anyone have any advice for what types I should use? I would really like to get to the point where you could search for a card and could get a rich result on the side with details about each card.
I've tried Product, but only some of them are cards that are actually sold. Others are digital only and free. I've considered Article and Creative Work, but am just really stumped as to what the best options would be for me. Is there such a thing as custom types that aren't insanely difficult to implement?

The contents of your website present a database for playing cards. Let's look at your web page representing one card 100 Battle Droids. In my humble opinion, this content is explicit Creative Work and this type can probably help you. Due to the fact that the subject of this web page is a game, the use of the embedded type Game can help you. For this type, you can use the about or mainEntity properties as alternatives.
The map that is presented in the content of this web page is an image. You can probably be helped by using the following Google guidelines for structured data for the Article type:
For best results, provide multiple high-resolution images (minimum of
300,000 pixels when multiplying width and height) with the following
aspect ratios: 16x9, 4x3, and 1x1. For example:
{
"#context": "https://schema.org",
"#type": "NewsArticle",
"image": [
"https://example.com/photos/1x1/photo.jpg",
"https://example.com/photos/4x3/photo.jpg",
"https://example.com/photos/16x9/photo.jpg"
]
}
You can use the free online calculator for the following aspect ratios:
4X3 and 16x9. To compress your images, you can search for image compressors on the web. I usually use Compressnow with the maximum level of 65%.
Using the Google Guides to optimize your images Google Image best practices and UX to responsive images.
Your information below the card is the table. The use of a responsive table (row only) for this data may probably help. You can use the W3 guide Generating JSON from Tabular Data on the Web to structure this data.
You can use Google guide to Dataset and the standard of W3 Data Catalog Vocabulary (DCAT) - Version 2 to create a database of your cards.

Related

What is the correct way to use google vision for OCR

Hope you're all fine.
For the past few days, I've been spending some time with google vision for a work project.
I'm quiet happy with the results but there are few things I can't figure out.
Here it is:
I'm trying to use Google Vision API to read information out of a Tyre picture,
this one for instance:
This is the list of features I'm using to call the API:
const features = [
{
"maxResults": 50,
"type": "LOGO_DETECTION"
},
{
"maxResults": 100,
"type": "DOCUMENT_TEXT_DETECTION"
}];
And my results are the following:
description: 'GOOD YEAR\n' +
'POSTER\n' +
'RADIAL\n' +
'YUDELESS\n' +
'EXTRA LOAD\n' +
'CSFY\n' +
'MADE IN GERMANY\n' +
'ROTATION\n' +
'II SGR\n' +
'(ED\n' +
'MINT\n' +
'M66 Lage\n' +
'VEU 900?\n'
I'm happy with this, but I'm lacking few information that I know the API can detect.
Case 1:
When I crop a part of the picture and use the exact same API and parameters
I get the following results:
{
locale: 'und',
description: '225 55R16 99W\n',
boundingPoly: [Object]
And, case 2, even when I'm using the online google vision try it service I'm getting some results for the digits
So at the end, I'm looking for the maximum information out of a picture, even if I need to sort it out after.
Ideas, answers, tips, I take everything.
Cheers,
Ivan
There is no general answer as to what is the best way to use Cloud Vision. It's powered by Machine Learning models and results depend on many factors like zoom, quality of the picture and method.
As you can see Cloud Vision API - How To Guides you have many specific functions.
OCR
Faces - detects multiple faces within an image along with the associated key facial attributes such as emotional
Image properties - detects general attributes of the image, such as dominant color.
Logos - popular product logos within an image.
and a few other features. Those features are using different algorithms to recognize specific things like text or logos, etc.
In your example you have a tire with the GoodYear logo, which has the name of the company. However if you would use Logo Detection on just a logo without anything it will return the name of the company (database of logos is maintained by google). For example logo of the Nike (Nike Logo URL) it will return name of the company.
Also quality of results depends on the zoom of the image. If text is too small it might not be recognized by algorithms. That's why you have differences when you have used the whole tire picture and zoomed part of it.
In general use TEXT_DETECTION is used for recognizing text in the picture and DOCUMENT_TEXT_DETECTION is used for extracting text from an image, but the response is optimized for dense text and documents.
Even TEXT_DETECTION and DOCUMENT_TEXT_DETECTION doing the same thing, they are using different algorithms for better results from picture recognizing text (TEXT_DETECTION) and from documents(DOCUMENT_TEXT_DETECTION).
To sum up, Cloud Vision has many features which are using different algorithms to fulfill specific needs like getting logos, detecting faces or text.
I hope it gives you a better understanding of Cloud Vision.

How many objects these Computer Vision API can detect?

https://learn.microsoft.com/fr-fr/azure/cognitive-services/computer-vision/concept-object-detection
https://cloud.google.com/vision/docs/object-localizer
I would want to know how many and which objects are recognizable using theses APIs and I can't find a mention of that fact.
I found that google API use https://developers.google.com/knowledge-graph/ which is based on schema.org types but I don't really understand well what it's all about.
I'm sorry but as far as I know, there is no fixed list of classes that Azure Computer Vision is able to detect.
By the way, even if there was one, this list is evolving on a regular basis (but no schedule is announced).
In any case, there are limitations (see doc here):
It's important to note the limitations of object detection so you can
avoid or mitigate the effects of false negatives (missed objects) and
limited detail.
Objects are generally not detected if they're small (less than 5% of
the image).
Objects are generally not detected if they're arranged
closely together (a stack of plates, for example).
Objects are not differentiated by brand or product names (different
types of sodas on a store shelf, for example). However, you can get
brand information from an image by using the Brand detection feature.
If you want to detect specific objects, I would highly suggest using Custom Vision (doc / overview here), not Computer Vision, where you can train your model with your own images to match what you are trying to detect

Number of results google (or other) search programmatically

I am making a little personal project.
Ideally I would like to be able to make programmatically a google search and have the count of results. (My goal is to compare the results count between a lot (100000+) of different phrases).
Is there a free way to make a web search and compare the popularity of different texts, by using Google Bing or whatever (the source is not really important).
I tried Google but seems that freely I can do only 10 requests per day.
Bing is more permissive (5000 free requests per month).
Is there other tools or way to have a count of number of results for a particular sentence freely ?
Thanks in advance.
There are several things you're going to need if you're seeking to create a simple search engine.
First of all you should read and understand where the field of information retrieval started with G. Salton's paper or at least read the wiki page on the vector space model. It will require you learning at least some undergraduate linear algebra. I suggest Gilbert Strang's MIT video lectures for this.
You can then move to the Brin/Page Pagerank paper which outlays the original concept behind the hyperlink matrix and quickly calculating eigenvectors for ranking or read the wiki page.
You may also be interested in looking at the code for Apache Lucene
To get into contemporary search algorithm techniques you need calculus and regression analysis to learn machine learning and deep learning as the current google search has moved away from Pagerank and utilizes these. This is partially due to how link farming enabled people to artificially engineer search results and the huge amount of meta data that modern browsers and web servers allow to be collected.
EDIT:
For the webcrawler only portion I'd recommend WebSPHINX. I used this in my senior research in college in conjunction with Lucene.

Using Leaflet with Google Maps?

Currently I am using Google Maps API 3 to display about 1000 users spread all over the world. This is for free, as long as I have less then 25.000 downloaded maps views per day.
Recently, I found out about the amazing JS Library Leaflet. I want to use it with OpenStreetMaps. As far as I have understood, one should not use tiles provided by OpenStreetMaps (Tile usage policy) but instead third party provider that makes tiles from OSM data, or generate your own.
I cannot provide my own tiles because I do not have appropriate hardware requirements.
Unfortunately I found that many third party provider for tiles have very strict limits, like MapQuest which is only for free as long as you do not exceed 15.000 map views per month (which seems not very attractive in comparison with Google Maps where you can use it for free as long as you do not exceed 25.000 map views per day).
So I wonder, is it possible to use Leaflet with Google Maps, so that I only have a limit of 25.000 map views per day?
According to this question the answer is clearly no.
However, according to Leaflet Map API with Google Satellite Layer the answer is yes.
Well, a lot to say here.
1) You can use OSM tiles as long as your usage is reasonable. If you find MapQuest limits quite restrictive, then indeed, you would probably be in the "over-reasonable" situation.
2) You have plenty 3rd party alternatives for tile sources (including MapQuest and Google Maps). If you are in the situation where you generate several thousands of views per month or day, then it is probably worth paying for a commercial service and ensure some availability service level. Of course Google Maps is still free and attractive for a high usage, at the cost of complying with their conditions (below).
3) Google Maps terms state that you can use Google Maps tiles only through Google Maps API. That is what some Leaflet plugins provide: they act as a proxy and use Google Maps API, so you should be compliant with Google Maps service terms. That is where you should probably provide your API key.
4) Therefore, the code snippet you show, which directly uses Google Maps tile template URL, is very probably not compliant with their terms, even though it may technically work.
As a side note, among the commercial 3rd party services for tile source, there is Mapbox. I do not especially like advertising, but I mention it because this is the company where the main Leaflet author works.

Models for 3d game programming? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm a beginner in game development and game programming. I have experience in computer graphics - mainly OpenGL
In those days Finally, I have some spare time to polish my game coding skills.
But when coming to program a simple 3d game, I couldn't find any good resource for free textures and models for 3d graphics (for 2d game for example, I found many resources for sprite sheets and so on).
Is there any good resource you're familiar with for 3d game textures/models?
This is not a programming queston.
As far as I know, good, free and high-quality modeling resources does not exist (from "good", "free" and "high-quality", select two).
There are multiple free model repositories, but quality of content is generally poor, and there are few places where you can buy models.
There are free textures in multiple places (like this one), and they are easier to find than good free models.
Also, most of free content frequently includes some kind of catch - "non-commercial use only", "creative commons share alike"(i.e. if you make derivative, it should use same license), or it is under GPL.
Anyway, if you're okay with "Creative Commons share alike" and GPL, then you can probably use content from some of opensource games (OpenArena ), and get quite a lot of textures from wikipedia or wikimedia commons, flickr, and you can google for "free textures". You should be careful about using content from opensource games - some opensource projects (like war$ow and sauerbraten) use closed-source/restricted licenses for game content (i.e. you're free to reuse modify engine, but you cannot modify game content and you cannot use it with modified engine. Reasons are pretty obvious).
Anyway, it depends on what kind of model you want. It is pretty easy to find "easy" stuff like boxes, barrels, etc, because everyone can do that. When it comes to guns and vehicles, there will be a trouble - quality will drop, and number of good models will decrease. And if you want a fully rigged animated character with multiple animation, normally you can forget about it - such content is almost impossible to find. But you can probably use mods for Q3 and Q2 if you want characters (you can forget about physics in this case, though)
I'd recommend to forget about "free stuff", and try to make content yourself or hire someone to do that.
If you decide to make content yourself, then you'll need digital photo camera and (optionally) graphic tablet. You can make mediocre textures from photos (digital camera is cheap) using gimp, gimp-resynthesizer plugin, gimp-texturisze plugin, high-pass filters, etc. You can also make normal maps using blender or gimp, and there are even tutorials about extracting them from photos (you still will need to process them by hand). Modeling and animation can be done in blender (after 1 or two weeks of training) using reference photos. Low poly modeling is pretty quick (20 minutes to make a low-poly low-quality gun, hour or two to make simple character), but texture and animation will take more (setting up animation for character can take a few hours for amateur, making one animation for character will take at least several hours as well, making texture unwrap - hour, painting texture - up to few days, depending on quality you want, available reference material, availability of graphic tablet, etc). It is possible to cut corners a bit - for example, for making animations, you can film motion using photo camera(or video camera), and then use it for rotoscoping. Also, you'll need to find some kind of model format blender can export to, or you'll have to write an export plugin in python.
The Blender foundation has a large model repository which may be of use.
There are some free models at Turbosquid that I use sometimes for my XNA games.
But of course, the best stuff is not free.
My experience is that there is very little in the way of quality 3d models with animation and full rigging freely available. There a few companies like this who sell suitable models cheaply and I guess most hobbyists could afford one or two models from them fairly easily which would probably be sufficient for learning. (I have no connection to them but I did buy one model pack from them which I quite liked)
It would be nice if there were a few more generally freely available 3d animated models around though. I even think it might be in the interests of some of the companies that make them to give a few away. If I'd been able to get further in my hobby projects I might have spent £100-200 in total on some nice model packs to make my project better, but due to the lack of any real 3d animated models I ended up losing interest in all my 3d projects before I got to the point of thinking maybe I'd spend a little money on this hobby. I wonder if the availability of a few more free quality models would actually significantly increase the size of the market for those companies as more people got their projects to the point where they were willing to spend a little money on it.
Some company should make a nice model pack with a few static models and a couple of fully rigged and animated humans and "monsters" and say that if the community donates £10000 they'll release them for free use. I suspect there are enough people out there who would like a few quality models they might reach this target in the same way that Blender was originally sold to the public.
I know that it's been a long time since this question was asked, but I ran into same problem when programming in XNA and I found a good solution. As long as you don't need rigged / animated models, Google Warehouse is the best place to search. As far as I know, each model submitted to Google Warehouse is available on Creative Commons license. You just need to:
Download and install Google Sketchup (Sketchup download)
Browse to find a model (Google Warehouse) - there's a 3D preview for each one!
Get a plugin to export Sketchup models to .X - I recommend the '3D RAD' plugin (3D RAD download)
If your model does not look good after the export, try to separate it into several less complex ones.
you are looking for open game art ...
http://thefree3dmodels.com/ has a multitude of free 3D models. I've used a few of these for animation purpose, maybe it'll help you too.