GithubHelp home page GithubHelp logo

File "run.py", line 61, in main l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/{}_init_{}.pickle".format(dataset_all.name, args.init), init=args.init) AttributeError: 'Market1501' object has no attribute 'name' about one-example-person-reid HOT 16 CLOSED

yu-wu avatar yu-wu commented on September 3, 2024
File "run.py", line 61, in main l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/{}_init_{}.pickle".format(dataset_all.name, args.init), init=args.init) AttributeError: 'Market1501' object has no attribute 'name'

from one-example-person-reid.

Comments (16)

Yu-Wu avatar Yu-Wu commented on September 3, 2024

Please check the content in ``examples''.

from one-example-person-reid.

ly-jy avatar ly-jy commented on September 3, 2024

File "run.py", line 61, in main
l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/market1501_init_0.2.pickle".format(dataset_all.name, args.init), init=args.init)
AttributeError: 'Market1501' object has no attribute 'name'

from one-example-person-reid.

Yu-Wu avatar Yu-Wu commented on September 3, 2024

@ly-jy
Please use original code.

There is attribute 'name' for this object.

from one-example-person-reid.

ly-jy avatar ly-jy commented on September 3, 2024

When I run "sh run.sh" in the terminal,:
Files already downloaded and verified
Market1501 dataset loaded
subset | # ids | # images

train | 651 | 11329
val | 100 | 1607
trainval | 751 | 12936
query | 750 | 16483
gallery | 751 | 19281
Traceback (most recent call last):
File "run.py", line 125, in
main(parser.parse_args())
File "run.py", line 61, in main
l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/{}init{}.pickle".format(dataset_all.name, args.init), init=args.init)
AttributeError: 'Market1501' object has no attribute 'name'
How can I use the original code you said?

from one-example-person-reid.

ly-jy avatar ly-jy commented on September 3, 2024

Excuse me, are you sure the code can run?
Can you run to make sure it can run?
I tried my best and didn't run through it.
Please help me, thank you very much!

from one-example-person-reid.

Yu-Wu avatar Yu-Wu commented on September 3, 2024

@ly-jy

Please run this code under a clean python environment.
It seems you might have installed'' the reid module of other codes before. Therefore, the module Market1501'' might be referred to a previous installed path.

from one-example-person-reid.

ly-jy avatar ly-jy commented on September 3, 2024

Thank you for your patience and answer. I hope you can help me. My problems are as follows:

I downloaded the code to the 'home' and upzip it. Put in the data set and run "sh run.sh" in the terminal. Report the error:
Traceback (most recent call last):
File "run.py", line 2, in
from reid.eug import *
ModuleNotFoundError: No module named 'reid.eug'

I cut out the 'eug.py' and modify ‘ from reid.eug import * ’ to ' ‘from eug import * ', And run 'sh run.sh'.Report the error:
Traceback (most recent call last):
File "run.py", line 2, in
from eug import *
File "/home/ly/liyang/One-Example-Person-ReID-master/eug.py", line 17, in
from reid.exclusive_loss import ExLoss
ModuleNotFoundError: No module named 'reid.exclusive_loss'

I cut out the 'exclusive_loss.py' and modify ‘ from reid.exclusive_loss import ExLoss * ’ to ' from exclusive_loss import ExLoss * ', And run 'sh run.sh'.Report the error:
Files already downloaded and verified
Market1501 dataset loaded
subset | # ids | # images

train | 651 | 11228
val | 100 | 1708
trainval | 751 | 12936
query | 750 | 16483
gallery | 751 | 19281
Traceback (most recent call last):
File "run.py", line 125, in
main(parser.parse_args())
File "run.py", line 61, in main
l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/{}init{}.pickle".format(dataset_all.name, args.init), init=args.init)
AttributeError: 'Market1501' object has no attribute 'name'

I change ' l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/{}init{}.pickle".format(dataset_all.name, args.init), init=args.init) ' to ' l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/market1501_init_0.2.pickle".format(dataset_all.name, args.init), init=args.init) '. But still an error:
File "run.py", line 61, in main
l_data, u_data = get_init_shot_in_cam1(dataset_all, load_path="./examples/market1501_init_0.2.pickle".format(dataset_all.name, args.init), init=args.init)
AttributeError: 'Market1501' object has no attribute 'name'

How can I do?

from one-example-person-reid.

Yu-Wu avatar Yu-Wu commented on September 3, 2024

@ly-jy

You should not fix the issue in this way......

I have updated my code just now. You can try the new code.
Please make sure you are using python3.

from one-example-person-reid.

ly-jy avatar ly-jy commented on September 3, 2024

Thank you very much for your answer. I have used python3, but I have encountered the following problem:
I downloaded the code to the 'home' and upzip it. I run "sh run.sh" in the terminal. Report the error:
FileNotFoundError: [Errno 2] No such file or directory: '/home/ly/One-Example-Person-ReID-master/data/market1501/train

I changed the ‘bounding_box_train’ file in the market to ‘train’, 'bounding_box_test' to 'gallery'.Then I put ‘train’, 'gallery', 'query' into the '/home/ly/One-Example-Person-ReID-master/data/market1501' file. And run 'sh run.sh'. Report the error:
NotADirectoryError: [Errno 20] Not a directory: '/home/ly/One-Example-Person-ReID-master/data/market1501/train/0002_c1s1_000451_03.jpg'
File '0002_c1s1_000451_03.jpg' already exists in file 'train'.How can I do?

from one-example-person-reid.

Yu-Wu avatar Yu-Wu commented on September 3, 2024

@ly-jy
You should use my changed dataset since I changed file names to make sure Image dataset work the same as the video dataset.

Please download them using the provided dataset link in readme.

from one-example-person-reid.

ly-jy avatar ly-jy commented on September 3, 2024

Hello author, I have some thoughts after reading your article. I want to know how the datasets you provide are processed. Can you share your code that processes the dataset? I am very grateful! Plase help me! Thank you very much!

from one-example-person-reid.

ly-jy avatar ly-jy commented on September 3, 2024

@ly-jy
You should use my changed dataset since I changed file names to make sure Image dataset work the same as the video dataset.

Please download them using the provided dataset link in readme.

I want to know how the datasets you provide are changed. Can you share your code that change the dataset? I am very grateful! Plase help me! Thank you very much!

from one-example-person-reid.

Yu-Wu avatar Yu-Wu commented on September 3, 2024

Sorry that the processing code is lost.

For your own dataset, you can use a very simple python scripts to generate the same format as ours. To do this, you only need some basic file operations.

from one-example-person-reid.

Yu-Wu avatar Yu-Wu commented on September 3, 2024

You can see the difference between the original Market dataset and my provided one. It's very simple to generate our format.

You can also see https://github.com/Yu-Wu/DukeMTMC-VideoReID/blob/master/README.md to better understand my "Directory Structure"

from one-example-person-reid.

ly-jy avatar ly-jy commented on September 3, 2024

Thank you very much for your answer. If you are convenient, I hope you can provide the code. Thank you so much!Plase help me! Thank you very much!

from one-example-person-reid.

Yu-Wu avatar Yu-Wu commented on September 3, 2024

Sorry that the code is lost.

I cannot find it.

from one-example-person-reid.

Related Issues (15)

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.