tandon-a / emotic Goto Github PK
View Code? Open in Web Editor NEWPyTorch implementation of Emotic CNN methodology to recognize emotions in images using context information.
License: MIT License
PyTorch implementation of Emotic CNN methodology to recognize emotions in images using context information.
License: MIT License
Hello, I would like to consult you. As mentioned in your code, threshold value can be used to help infer. I am not quite clear how this is used to infer.Looking forward to your reply.Thank you!
Traceback (most recent call last):
File "main.py", line 86, in
train_emotic(result_path, model_path, train_log_path, val_log_path, ind2cat, ind2vad, context_norm, body_norm, args)
File "D:\2022-next\2022-text\emotic-master\train.py", line 174, in train_emotic
model_context, model_body = prep_models(context_model=args.context_model, body_model=args.body_model, model_dir=model_path)
File "D:\2022-next\2022-text\emotic-master\prepare_models.py", line 28, in prep_models
model = torch.load(model_file, map_location=lambda storage, loc: storage, pickle_module=pickle)
File "D:\anaconda3\envs\pytorch114\lib\site-packages\torch\serialization.py", line 795, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "D:\anaconda3\envs\pytorch114\lib\site-packages\torch\serialization.py", line 820, in _legacy_load
class UnpicklerWrapper(pickle_module.Unpickler): # type: ignore[name-defined]
TypeError: the first argument must be callable
Hello. I was wondering how did your models perform in the emotic test set. Did you manage to match or even surpass the author's original results?
I can't download EMOTIC dataset on the official website. Can you send the dataset to my email([email protected])?
Hello,
I have a question about the threshold which you used.
First, I try to calculate thresholds where precision is equal to recall. After that, results from model will compare with it to become array [1, 0, ...0]. If I continue with it and use the function "average_precision_score", I will get another meanAP.
Did I do any wrong steps?
I want to know how fast this model is used to process the camera in real time?
How do inference_file.txt get,the sample-inference_file.txt file given in the project? Also, (x1,y1) and (x2,y2) specify where the bounding box comes from? Thank you so much!
when the command is 'python main.py --mode inference --inference_file .....' and 'python main.py --mode test --inference_file ....’. There is a problem,said:AttributeError: Can't get attribute 'Emotic' on <module 'main' from 'main.py'>.How can i solve this problem
in yolo_utils.py 316 lines
if targets is None:
return output, 0
else:
iou_scores, class_mask, obj_mask, noobj_mask, tx, ty, tw, th, tcls, tconf = build_targets(
pred_boxes=pred_boxes,
pred_cls=pred_cls,
target=targets,
anchors=self.scaled_anchors,
ignore_thres=self.ignore_thres,
)
Unresolved reference 'build_targets' ,display undefined.
Also, do I need to inference_list.txt files when yolo_inference.py test videos? Where to get the file if needed, mine came out with poor results if it wasn't needed
Mean VAD Error is quite high.. I am getting below values:
Continuous Valence 0.73813
Continuous Arousal 0.94274
Continuous Dominance 0.92793
Mean VAD Error 0.86960
Can you please explain any possible reason?
while loading pretrained 'model_emotic1.pth'
getting this error
mode inference
Traceback (most recent call last):
File "main.py", line 102, in
inference_emotic(args.inference_file, model_path, result_path, context_norm, body_norm, ind2cat, ind2vad, args)
File "E:\emotic-master\inference.py", line 110, in inference_emotic
emotic_model = torch.load(os.path.join(model_path,'model_emotic1.pth')).to(device)
File "C:\Python\Python36\lib\site-packages\torch\serialization.py", line 592, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "C:\Python\Python36\lib\site-packages\torch\serialization.py", line 851, in _load
result = unpickler.load()
AttributeError: Can't get attribute 'Emotic' on <module 'main' from 'main.py'>
(emotic) root@autodl-container-919011829e-7f6a3e29:~/autodl-tmp/emotic-master# python main.py --mode train --data_path data/Emotic/emotic_pre --experiment_path proj/debug_exp
mode train
train context (23266, 224, 224, 3) body (23266, 128, 128, 3) cat (23266, 26) cont (23266, 3)
val context (3315, 224, 224, 3) body (3315, 128, 128, 3) cat (3315, 26) cont (3315, 3)
train loader 448 val loader 64
Traceback (most recent call last):
File "main.py", line 88, in
train_emotic(result_path, model_path, train_log_path, val_log_path, ind2cat, ind2vad, context_norm, body_norm, args)
File "/root/autodl-tmp/emotic-master/train.py", line 174, in train_emotic
model_context, model_body = prep_models(context_model=args.context_model, body_model=args.body_model, model_dir=model_path)
File "/root/autodl-tmp/emotic-master/prepare_models.py", line 26, in prep_models
model = torch.load(model_file, map_location=lambda storage, loc: storage, pickle_module=pickle)
File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 713, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 738, in _legacy_load
class UnpicklerWrapper(pickle_module.Unpickler): # type: ignore[name-defined]
TypeError: the first argument must be callable
When running the following command:
python mat2py.py --data_dir ~/Desktop/passion/data/Annotations --generate_npy --label train
While the csv is generated, the process gets killed before it can generate the npy files.
libpng warning: iCCP: known incorrect sRGB profile
Preprocessing data. Index = 22000
Preprocessing data. Index = 23000
81 0 359
wrote file /home/amittel/Desktop/proj/data/Annotations/emotic_pre/train.csv
Killed
The link you shared with Google Drive has expired, can you share it again? Thank you.
when I run this command
python main.py --mode train --data_path proj/data/emotic_pre --experiment_path proj/debug_exp
the main.py script is opened in notepad++ and nothing else happends
Any help
您好,最近在学习相关知识,请问融合然后网络发生变化了吗?修改的主要部分是什么呢?期待您的回答,谢谢。
@Tandon-A Can you share your pre-trained model?
how can i fix this error???
Traceback (most recent call last):
File "main.py", line 4, in
from train import train_emotic
File "/content/gdrive/MyDrive/Deep learning Models/emotic-master/emotic-master/train.py", line 16, in
from loss_classes import DiscreteLoss, ContinuousLoss_SL1, ContinuousLoss_L2
ModuleNotFoundError: No module named 'loss_classes'
mode train
tcmalloc: large alloc 3502186496 bytes == 0x55b885002000 @ 0x7f8f31a3a1e7 0x7f8f2f5ba46e 0x7f8f2f60ee7c 0x7f8f2f60faaf 0x7f8f2f6b1470 0x55b87ecc1544 0x55b87ecc1240 0x55b87ed35627 0x55b87ed2f9ee 0x55b87ecc2bda 0x55b87ed31737 0x55b87ed2f9ee 0x55b87ecc2bda 0x55b87ed34d00 0x55b87ecc2afa 0x55b87ed30915 0x55b87ed2f9ee 0x55b87ed2f6f3 0x55b87edf94c2 0x55b87edf983d 0x55b87edf96e6 0x55b87edd1163 0x55b87edd0e0c 0x7f8f30824bf7 0x55b87edd0cea
train context (23266, 224, 224, 3) body (23266, 128, 128, 3) cat (23266, 26) cont (23266, 3)
val context (3315, 224, 224, 3) body (3315, 128, 128, 3) cat (3315, 26) cont (3315, 3)
train loader 448 val loader 64
data/experiment/models/resnet18_places365.pth.tar
Traceback (most recent call last):
File "main.py", line 87, in
train_emotic(result_path, model_path, train_log_path, val_log_path, ind2cat, ind2vad, context_norm, body_norm, args)
File "/content/gdrive/My Drive/Deep learning Models/emotic-master/emotic-master/train.py", line 174, in train_emotic
model_context, model_body = prep_models(context_model=args.context_model, body_model=args.body_model, model_dir=model_path)
File "/content/gdrive/My Drive/Deep learning Models/emotic-master/emotic-master/prepare_models.py", line 32, in prep_models
checkpoint = torch.load(save_file, map_location=lambda storage, loc: storage) # model trained in GPU could be deployed in CPU machine like this!
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 607, in load
return _load(opened_zipfile, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 869, in _load
class UnpicklerWrapper(pickle_module.Unpickler): # type: ignore[name-defined]
TypeError: the first argument must be callable
According to the paper, the threshold of discrete emotion recognition is set as Precision=Recall. Why is it set like this? How did you get this value? Did you get it through training?
What do the values of the elements [1,26] represent when you enter a picture? It doesn't mean accuracy, does it?
I am a novice, hope to get your answer, thank you!
How to test on pictures or videos, follow the steps to get the final result of a txt file.Thanks!
I found almost half of the bounding boxes are not correct where the boxes do not bind the full person after I visualized the pictures.
Hi,
I ran the training step and got the models, then I ran test and the mAP was only 0.20610.
Firstly, I thought maybe it's because of my bad training. So I downloaded given trained models and thresholds and the mAP of test step is still low.
Then I thought about preprocessing step of dataset, I received errors like: libpng warning: iCCP: known incorrect sRGB profile
, libpng warning: iCCP: extra compressed data
and Corrupt JPEG data: 44 extraneous bytes before marker 0xd9
, I don't know whether they have some bad influence.
Then I saw the result of test step from this notebook. It looks similar to my result. But I wonder why mAP is quite different from that in paper.
I'd appreciate if you could give me some hints.
Best regards,
Hui
Hi,
I'm sorry to bother again. I don't know if it's possible to have access to the preprocessed data. I guess there are something wrong with my running. I always get an mAP of 0.21.
Best regards,
Hui
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.