varunagrawal / tiny-faces-pytorch

Finding Tiny Faces in PyTorch
MIT License
163 stars 44 forks source link

What is clustering.jbl #1

Closed Kim-Minseon closed 5 years ago

Kim-Minseon commented 6 years ago

Hello, thanks for the replication the paper in pytorch.

I try to run your code but I have some problem. First, I have no idea what is the clustering.jbl is. Do I need to change the mat file in the author's git to jbl file? How can I do that? And I also have the error in cluster.py file like below. How can I fix it?

Traceback (most recent call last): File "main.py", line 59, in main() File "main.py", line 33, in main train_loader, weights_dir = get_dataloader(args.traindata, args, num_templates) File "/home/minseon/tiny-faces-pytorch-master/datasets/init.py", line 33, in get_dataloader option='pyclustering', max_clusters=num_clusters) File "/home/minseon/tiny-faces-pytorch-master/utils/cluster.py", line 74, in compute_kmedoids joblib.dump(dist, distances_cache, compress=5) File "/usr/lib/pymodules/python2.7/joblib/numpy_pickle.py", line 362, in dump % (filename, type(filename)) ValueError: Second argument should be a filename, distances_1.jbl (type <class 'pathlib.PosixPath'>) was given

Last, in the model.py file, at the bilinear initialization part, what does @/ <- this mean? I got an error at that point.

Sorry for lots of questions.

varunagrawal commented 5 years ago

Really sorry for the late response.

I should upload the clustering.jbl file. It is just a set of canonical template boxes from Peiyun's original repository.

The @ should be a matrix multiplication. What is your numpy version? Are you using Python 3?

varunagrawal commented 5 years ago

You should just have to pass in the dataset file, which for WIDER faces should just be the wider_face_train_bbx_gt.txt.

Again, I'm really sorry for being behind on this. I'll be updating this repo next week with instructions and results. Thank you for your patience!

feixiangdekaka commented 5 years ago

Really sorry for the late response.

I should upload the clustering.jbl file. It is just a set of canonical template boxes from Peiyun's original repository.

The @ should be a matrix multiplication. What is your numpy version? Are you using Python 3?

The result from clustering.jbl is not the same as the fllowing function : clustering = compute_kmedoids(dataset.get_all_bboxes(), 1, indices=num_clusters, option='pyclustering', max_clusters=num_clusters)

which one to choose?

varunagrawal commented 5 years ago

I have updated the repository to fix these issues. @peiyunh did some great analysis and found the best bounding box templates for the WIDERFace dataset and so I provide those by default.

The clustering code is in case you wish to run this on a different dataset, though I imagine that the default templates should work well regardless.

varunagrawal commented 5 years ago

@Kim-Minseon @feixiangdekaka please pull the latest master branch and let me know if everything works, then I can go ahead and close this issue!

Thank you again for your patience.

feixiangdekaka commented 5 years ago

@Kim-Minseon @feixiangdekaka please pull the latest master branch and let me know if everything works, then I can go ahead and close this issue!

Thank you again for your patience.

I will try it this weekend .

varunagrawal commented 5 years ago

@feixiangdekaka any updates?

varunagrawal commented 5 years ago

Closing this because of lack of updates.