Downloads · 30 days
9
5% of all-time downloads
Soviet-Bear/clip-camping-v2
clip-camping-v2 is a machine learning model from Soviet-Bear. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Fine-tuned CLIP model for identifying suitable camping locations from satellite imagery.
Downloads · 30 days
9
5% of all-time downloads
All-time downloads
196
Public
Repo size
832 KB
Likes
0
Public
Click a slice to open those files.
.pth706 KB · 82%
From the Hugging Face model README
Fine-tuned CLIP model for identifying suitable camping locations from satellite imagery.
import torch
from PIL import Image
from transformers import CLIPProcessor, CLIPModel
# Load model and processor
processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
checkpoint = torch.load("clip_v2_best.pth")
# Load image
image = Image.open("satellite_image.jpg")
# Process and classify
inputs = processor(images=image, return_tensors="pt")
with torch.no_grad():
image_features = model.get_image_features(**inputs)
classifier_output = classifier(image_features)
score = torch.softmax(classifier_output, dim=1)[0][1] # Campable probability
print(f"Campability Score: {score * 100:.1f}%")
import requests
import base64
API_URL = "https://api-inference.huggingface.co/models/Soviet-Bear/clip-camping-v2"
headers = {"Authorization": f"Bearer {HF_TOKEN}"}
with open("image.jpg", "rb") as f:
data = f.read()
response = requests.post(API_URL, headers=headers, data=data)
result = response.json()
Training data sourced from:
clip_v2_best.pth: Trained classifier weightsconfig.json: Model configurationmodel_index.json: Pipeline specificationtraining_results.json: Complete training metricstraining_history.png: Training/validation curvesIf you use this model, please cite:
@model{clip-camping-v2,
title={CLIP v2 Camping Spot Detector},
author={Soviet-Bear},
year={2025}
}
This model derivative is based on OpenAI's CLIP model. See LICENSE for details.