v2.0.0

Services

Image to GPS

In the absence of GPS EXIF data, our AI system provides GPS estimation.

Image EXIF Data

We provide image EXIF data, including camera model, timestamps, and more..

Landmarks detection

Our system excels with landmark images. The service will be provided soon.

API

Copy
   
                                            
    # First, pip install picarta 
    from picarta import Picarta

    api_token = "YOUR_API_TOKEN"
    localizer = Picarta(api_token)

    # Geolocate a local image worldwide
    result = localizer.localize(img_path="/path/to/local/image.jpg")

    print(result)

    # Geolocate an image from URL with optional parameters for a specific location search
    # If you want to search worldwide, keep these as None;
    # center_latitude and center_longitude define the center of the search area.    
    # radius defines the search area around the center point in kilometers.

    result = localizer.localize(
    img_path="https://upload.wikimedia.org/wikipedia/commons/8/83/San_Gimignano_03.jpg",
    top_k=10,
    center_latitude=43.464, 
    center_longitude=11.038,
    radius=100)

    print(result)

                                            
                                        
                                            
    # without using picarta package
    import requests
    import json
    import base64

    url = "https://picarta.ai/classify"
    api_token = "API_TOKEN"  # register to get the token
    top_k = 3 # You can choose up to 100 GPS predictions. The default is 10
    headers = {"Content-Type": "application/json"}

    # Read the image from a local file, comment out the next two lines if you read from URL 
    with open("path/to/local/image.jpg", "rb") as image_file:
        img_path = base64.b64encode(image_file.read()).decode('utf-8')

    # OR  

    # from a URL, comment out the next line if you read from a local file
    #img_path = "https://upload.wikimedia.org/wikipedia/commons/8/83/San_Gimignano_03.jpg"

    # Optional parameters for a specific location search. 
    # If you want to search worldwide, keep these as None;
    # center_latitude and center_longitude define the center of the search area.    
    # radius defines the search area around the center point in kilometers.
    center_latitude, center_longitude, radius = None, None, None 

    # Prepare the payload 
    payload = {"TOKEN": api_token,
               "IMAGE": img_path,
               "TOP_K": top_k,
               "Center_LATITUDE": center_latitude,
               "Center_LONGITUDE": center_longitude,
               "RADIUS": radius}

    # Send the POST request with the payload as JSON data
    response = requests.post(url, headers=headers, json=payload)

    if response.status_code == 200:
        result = response.json()
        print(result)
    else:
        print("Request failed with status code:", response.status_code)
        print(response.text)
                                            
                                        
                                            
    const fs = require('fs');

    const url = "https://picarta.ai/classify";
    const apiToken = "API_TOKEN"; // Replace with your API token
    const headers = {"Content-Type": "application/json"};

    // Read the image from a local file
    const imagePath = "path/to/local/image";
    const imageData = fs.readFileSync(imagePath);
    const imgPath = Buffer.from(imageData).toString('base64');

    // OR from a URL
    // const imgPath = "https://upload.wikimedia.org/wikipedia/commons/8/83/San_Gimignano_03.jpg";

    // Optional parameters for a specific location search.
    // If you want to search worldwide, keep these as null.
    // center_latitude and center_longitude define the center of the search area.
    // radius defines the search area around the center point in kilometers.
    let center_latitude = null;
    let center_longitude = null;
    let radius = null;
    let top_k = 3; // You can choose up to 10 GPS predictions. The default is 3


    // Prepare the payload
    const payload = {
        "TOKEN": apiToken,
        "IMAGE": imgPath,
        "TOP_K": top_k,
        "Center_LATITUDE": center_latitude,
        "Center_LONGITUDE": center_longitude,
        "RADIUS": radius,
    };

    // Send the POST request with the payload as JSON data
    fetch(url, {
        method: "POST",
        headers: headers,
        body: JSON.stringify(payload)
    })
    .then(response => {
        if (response.ok) {
            return response.json();
        } else {
            throw new Error("Request failed with status code: " + response.status);
        }
    })
    .then(result => {
        console.log(result);
    })
    .catch(error => {
        console.error("Request failed with error:", error);
        console.error(response.text);
    });                                
                                            
                                        
                                            
    # For local image file
    img_path=$(base64 -w0 "/path/to/local/image.jpg")

    # OR

    # For image from a URL (comment out the above line and uncomment the next line)
    #img_path="https://upload.wikimedia.org/wikipedia/commons/8/83/San_Gimignano_03.jpg"

    # Optional parameters for a specific location search. 
    # If you want to search worldwide, keep these as null.
    # center_latitude and center_longitude define the center of the search area.
    # radius defines the search area around the center point in kilometers.
    center_latitude=null
    center_longitude=null
    radius=null
    top_k=3 # You can choose up to 10 GPS predictions. The default is 3

    # Construct the JSON payload
    echo '{
        "TOKEN": "API_TOKEN", 
        "IMAGE": "'"$img_path"'",
        "TOP_K": "'"$top_k"'", 
        "Center_LATITUDE": "'"$center_latitude"'", 
        "Center_LONGITUDE": "'"$center_longitude"'", 
        "RADIUS": "'"$radius"'"
    }' > payload.json

    # Send the request using curl
    curl --request GET \
        --url https://picarta.ai/classify \
        --header 'Content-Type: application/json' \
        --data @payload.json
                                            
                                        
                                            
    # For local image file
    base64_image=$(base64 -w0 "/path/to/local/image.jpg")

    # For image from a URL (comment out the above line and uncomment the next line)
    #base64_image=$(base64 -w0 <(wget -qO- "https://upload.wikimedia.org/wikipedia/commons/8/83/San_Gimignano_03.jpg"))

    # Optional parameters for a specific location search. 
    # If you want to search worldwide, keep these as null.
    # center_latitude and center_longitude define the center of the search area.
    # radius defines the search area around the center point in kilometers.
    center_latitude=null
    center_longitude=null
    radius=null
    top_k=3 # You can choose up to 10 GPS predictions. The default is 3

    # Construct the JSON payload
    echo '{
        "TOKEN": "API_TOKEN", 
        "IMAGE": "'"$base64_image"'",
        "TOP_K": "'"$top_k"'",
        "Center_LATITUDE": "'"$center_latitude"'", 
        "Center_LONGITUDE": "'"$center_longitude"'", 
        "RADIUS": "'"$radius"'"
    }' > payload.json

    # Send the request using wget
    wget --method=POST \
         --header='Content-Type: application/json' \
         --body-file=payload.json \
         --output-document=picarta_output.json \
         https://picarta.ai/classify
                                            
                                        

How Picarta Process And Works

Utilizing advanced AI methods, we precisely determine global image coordinates. We aim to provide individuals and businesses a dependable geolocation solution, enabling exploration, research, and informed choices.

Our Policy

  • 01

    14-day money-back guarantee for the Premium Plan

    If unsatisfied within 14 days, unsubscribe for a guaranteed refund.

  • 02

    Inaccurate results

    No charges if our system is uncertain about GPS estimation.

  • 03

    Collect The Data

    Uploaded images will be deleted.

A team of AI engineers is examining data