FCN

A dense per-pixel classifier that replaces a detector's fully connected layers with convolutions, so it outputs a full-resolution class map instead of boxes. LibreYOLO ships it for semantic segmentation only.

Tasks
semantic
Sizes
r50, r101 at 520 px
Install
pip install libreyolo
Support tier
Inference only, since v. Predict, validate and export only. Training features do not apply.
Upstream
FCN by PyTorch, BSD-3-Clause. Paper, source
Licenses
Code BSD-3-Clause, weights BSD-3-Clause. Commercial use

Install

FCN needs no optional extra. Everything it imports is in the base install.

bash
pip install libreyolo

Predict

Weights download from Hugging Face on first use and are cached locally.

Python
from libreyolo import LibreYOLO, SAMPLE_IMAGE model = LibreYOLO("LibreFCNr50.pt")result = model(SAMPLE_IMAGE, save=True) mask = result.semantic_maskprint(mask.data.shape)   # (H, W) class idsprint(mask.classes)      # sorted class ids present in the image
CLI
libreyolo predict model=LibreFCNr50.pt source=https://raw.githubusercontent.com/LibreYOLO/libreyolo/release/libreyolo/assets/parkour.jpg save=True

Semantic segmentation returns one class id per pixel, not boxes, so result.semantic_mask carries a (H, W) array on .data and the list of class ids present in the image on .classes. conf, iou and max_det are accepted for API parity but have no effect: the model assigns a class to every pixel by argmax, with no confidence threshold or NMS step. See prediction for sources, streaming and result handling.

Variants

Two ResNet depths, both at a fixed 520 px input. The library's inference graph is torchvision's dilated-ResNet FCN, not the original paper's VGG-based FCN-8s network with skip connections.

LibreYOLO does not train FCN: train() raises NotImplementedError for this family, which the support tier above marks as inference only. The two published checkpoints are torchvision's own COCO-trained weights, converted for LibreYOLO's loader.

Validate

val() returns metrics/mIoU and metrics/pixel_accuracy, measured against any dataset in the format you trained on.

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreFCNr50.pt")metrics = model.val(data="my-dataset.yaml") print(metrics["metrics/mIoU"])print(metrics["metrics/pixel_accuracy"])
CLI
libreyolo val model=LibreFCNr50.pt data=my-dataset.yaml

Export

TaskONNXTorchScriptExecuTorchTensorRTOpenVINOPaddleMNNRKNNncnnTFLiteCoreMLCore AI
semanticsemantic to ONNX: supported. semantic to TorchScript: supported. semantic to ExecuTorch: not supportedsemantic to TensorRT: supported. semantic to OpenVINO: supported. semantic to Paddle: not supportedsemantic to MNN: not supportedsemantic to RKNN: not supportedsemantic to ncnn: not supportedsemantic to TFLite: not supportedsemantic to CoreML: not supportedsemantic to Core AI: not supported

An exported artifact loads back through LibreYOLO() on its file suffix, so a .onnx or .engine file behaves like a checkpoint and returns the same Results. Export lists the arguments every format accepts.

Python
from libreyolo import LibreYOLO model = LibreYOLO("LibreFCNr50.pt")model.export(format="onnx")model.export(format="tensorrt", half=True)
CLI
libreyolo export model=LibreFCNr50.pt format=onnxlibreyolo export model=LibreFCNr50.pt format=tensorrt half=True
Use the exported file
from libreyolo import LibreYOLO, SAMPLE_IMAGE # The factory routes on the file suffix, so an exported artifact loads# like any checkpoint and returns the same Results object.model = LibreYOLO("LibreFCNr50.onnx")result = model(SAMPLE_IMAGE) print(result.semantic_mask.data.shape)

Checkpoints

Every published weight file for this family.

FileInput (px)Weights license
semantic
LibreFCNr50.pt520bsd-3-clause
LibreFCNr101.pt520bsd-3-clause

Every file above exists in the LibreYOLO org today and downloads on first use.

Licensing

Check the license on the Hugging Face repository of the specific weights you download. Every checkpoint in the LibreYOLO org carries one, and they are not always the same across a family. That repository is the authoritative source; the summary below describes what applied when this page was last verified.

This is a description of the licenses involved, not legal advice. If the answer matters commercially, read the licenses yourself and take your own counsel.

Original work
FCN, PyTorch
Upstream license
BSD-3-Clause
LibreYOLO code
MIT
Weights
BSD-3-Clause, republished at huggingface.co/LibreYOLO
Interpretation
BSD-3-Clause is a permissive license, so this code and these weights can be used in commercial and closed-source products. It asks you to keep the copyright notice, license text and a non-endorsement clause with any copy you redistribute. LibreYOLO's inference graph is torchvision's dilated-ResNet FCN, not the original VGG-based FCN-8s skip-fusion network from the paper. The two published checkpoints are torchvision's official COCO-trained weights; their separate LibreYOLO Hugging Face mirrors carry BSD-3-Clause on an implied basis disclosed by torchvision rather than an explicit checkpoint-specific grant, and torchvision's own documentation notes that pretrained-model terms can depend on the training data, leaving that determination to the user.

Verified against LibreYOLO v1.5.0. Support tables, checkpoints and benchmark numbers on this page are generated from the released library and the published weights, not written by hand.