Unable to load weights after downloading
Hello, I'm trying to run the model going off of the example code, but by downloading best.pt i get a folder with pickled files and other stuff (data, data.pkl), i don't know if this i intended or i Xet is does this when somebody tries to download larger files from the Hub, but any help is appreciated
I was able to recover the .pt file with this:
import zipfile
import os
folder = "model_folder" # path to your extracted folder
output = "recovered_model.pt"
The archive name (subdirectory prefix) β usually "archive" for PyTorch
archive_name = "archive"
valid_time = (1980, 1, 1, 0, 0, 0)
def add_file(zf, disk_path, zip_path):
with open(disk_path, "rb") as f:
data = f.read()
info = zipfile.ZipInfo(zip_path)
info.date_time = valid_time
zf.writestr(info, data)
with zipfile.ZipFile(output, "w") as zf:
for filename in ["data.pkl", "byteorder", "version"]:
add_file(zf, os.path.join(folder, filename), f"{archive_name}/{filename}")
for f in os.listdir(os.path.join(folder, "data")):
add_file(zf, os.path.join(folder, "data", f), f"{archive_name}/data/{f}")
print("Done! Saved to", output)
this is surprising - can you let me know how you cloned the repo?, was it just a git clone?
this is surprising - can you let me know how you cloned the repo?, was it just a git clone?
I actually downloaded 'best.pt' directly from the Hub web interface (the download button on the file bar). Also, any info on the training distribution for the model? (mostly interested in embodiment and environment colors or other visual stuff like that).
p.s. very cool model, thanks
Yeah!, training data is here https://huggingface.co/datasets/riversnow/so101-segmentation, it's trained on 4000 synthetically generated images and 110 hand-labelled images (hand labelled by me)
I generated the synthetic data using https://github.com/johnsutor/so101-nexus, the supplimental background stuff I used is mentioned here https://huggingface.co/datasets/riversnow/so101-segmentation I didn't document the backgrounds I used π
Also thank you!, I didn't actually realise how popular this got until now