Giter VIP home page Giter VIP logo

const's People

Contributors

ys-zong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

const's Issues

function contrastive_loss loss

Hi Author!
I met some errors when running conST, which reported the error "did not define the function contrastive_loss". I didn't find the code of contrastive_loss in the model.py or in the training.py. Could you help me solve it?

Thanks!

leidenalg issue

Hey,

I was trying to run your code on my local but leidenalg keeps giving this error:
BaseException: Could not construct partition: Weight vector not the same size as the number of edges.
I have tried using every version of leidenalg from 0.7.0 to 0.9.0.
Do you happen to know any work around.

Complete Error Message:
`BaseException Traceback (most recent call last)
/tmp/ipykernel_58748/2566975975.py in
35 sc.pp.neighbors(adata_conST, n_neighbors=params.eval_graph_n)
36
---> 37 eval_resolution = res_search_fixed_clus(adata_conST, n_clusters)
38 print(eval_resolution)
39 cluster_key = "conST_leiden"

/media/nikhilmehta/New Volume/01IITK/Sem 7/CS690/conST/src/utils_func.py in res_search_fixed_clus(adata, fixed_clus_count, increment)
36 '''
37 for res in sorted(list(np.arange(0.01, 2.5, increment)), reverse=True):
---> 38 sc.tl.leiden(adata, random_state=0, resolution=res)
39 count_unique_leiden = len(pd.DataFrame(adata.obs['leiden']).leiden.unique())
40 if count_unique_leiden == fixed_clus_count:

~/anaconda3/envs/cs690/lib/python3.7/site-packages/scanpy/tools/_leiden.py in leiden(adata, resolution, restrict_to, random_state, key_added, adjacency, directed, use_weights, n_iterations, partition_type, neighbors_key, obsp, copy, **partition_kwargs)
142 partition_kwargs['resolution_parameter'] = resolution
143 # clustering proper
--> 144 part = leidenalg.find_partition(g, partition_type, **partition_kwargs)
145 # store output into adata.obs
146 groups = np.array(part.membership)

~/anaconda3/envs/cs690/lib/python3.7/site-packages/leidenalg/functions.py in find_partition(graph, partition_type, initial_membership, weights, n_iterations, max_comm_size, seed, **kwargs)
81 kwargs['weights'] = weights
...
--> 856 singleton partition.
857
858 weights : list of double, or edge attribute

BaseException: Could not construct partition: Weight vector not the same size as the number of edges.`

Licence

Could you please add a licence to your code. It is unclear if the tool is open source.

Thank you very much for your time.

conST_151673.pth

Greetings, Currently, I have been assigned the task of replicating your conST method; however, I am unable to locate any others such as conST_151674.pth. Could you kindly guide me on where to find them? Thank you sincerely for your assistance.

wrong input_dims when use_img

Hello,
I noticed that several layers had wrong input dimensions when I turned use_img to True, and I have corrected them in my repo forked from yours: frickyinn/conST.
But with MAE image features, the ARI result were little lower than merely using gene expression. I think that maybe I was using the wrong hyper-parameters when I tried to change the dimensions. So could you help me solve this?
image

Thank you!

"RuntimeError Unknown model" in MAE Feature Extraction

Hello,
I was trying to run your model following the provided notebook conST_cluster.ipynb.

For the Histology feature extraction part, following your steps, I am facing an error from the run_mae_extract_feature.py file

Creating model: pretrain_mae_base_patch16_224
Traceback (most recent call last):
  File "run_mae_extract_feature.py", line 97, in <module>
    main(opts)
  File "run_mae_extract_feature.py", line 58, in main
    model = get_model(args)
  File "run_mae_extract_feature.py", line 42, in get_model
    model = create_model(
  File "/usr/local/lib/python3.8/dist-packages/timm/models/factory.py", line 78, in create_model
    raise RuntimeError('Unknown model (%s)' % model_name)
RuntimeError: Unknown model (pretrain_mae_base_patch16_224)

My timm version is timm-0.6.12. Exploring the rwightman/pytorch-image-models repo, I am led to believe I need to install this model on timm (similar issue on the repo huggingface/pytorch-image-models#158 ).

Could you provide me with the necessary files for the pretrain_mae_base_patch16_224 model?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.