Skip to content

This is an implementation of zoomout or hypercolumns in Pytorch

License

Notifications You must be signed in to change notification settings

xksteven/Sparse-Hypercolumns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sparse-Hypercolumns

This is an implementation of zoomout or hypercolumns in Pytorch as seen in papers such as Learning Representations for Automatic Colorization.

This is based off of the models in Torchvision 1.5.0.

Currently implemented:
Resnet

TODOs:
other models (densenet,...)

Examples

import models.resnet

model = resnet18(full_hypercolumns=True)
x = torch.randn(1,3,256,256)
logits, hypercolumns = model(x)

The hypercolumns can then be passed into another model or used.

Possible arguments:

model = resnet18(full_hypercolumns=True)

# or one can provide a partial of indices one wants to use for the output
# out_size reflects the final output shape of the hypercolumns

model = resnet18(indices=[[0,1,37],[2,5,49]], out_size=(50,50))
# format of indices is [[row_indices], [column_indices]]

# or one can provide a full list (or numpy array) of indices one wants to use for the output
model = resnet18(indices=[[0,1,37],[2,5,49]])
# format of indices is [[row_indices], [column_indices]]

About

This is an implementation of zoomout or hypercolumns in Pytorch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages