Comments (3)
Hey,
This should be pretty straight forward using the DataBlock
API. Just define your get_x
and get_y
, with the corresponding columns in the dataframe. For each row of your dataframe, you get a pair (folder_path, target_value)
. Something like:
def get_x(row):
return Path(row[path_col_name]).ls().sorted()
def get_y(row):
return row[target_col]
You could also use the fastai method:
Init signature: ColReader(self, cols, pref='', suff='', label_delim=None)
Docstring: Read `cols` in `row` with potential `pref` and `suff`
File: ~/miniconda3/envs/fastai/lib/python3.8/site-packages/fastai/data/transforms.py
Type: _TfmMeta
There is also a more detailed version of the action notebooks on a PR that I am making for fastai :
https://github.com/fastai/fastai/blob/0c18d134099b62dcc9f9b105e2295088f38abab4/nbs/24_tutorial.image_sequence.ipynb
from action_recognition.
yes, that was it. I was making it way too complicated. Thanks!
from action_recognition.
I the last update, I removed the Block API. Sorry if that hurts your dev.
The mid level API is now the preferred way, and it is very well documented.
from action_recognition.
Related Issues (20)
- TypeError: 'PosixPath' object is not subscriptable HOT 1
- HOw to achieve 94.8% of Accuracy HOT 9
- the model predict a result tensor like [-0.4135, -0.3328, -0.4700, -0.4385, 0.1240] HOT 1
- Can't get transforms to work in this scenario HOT 1
- [Question] : Is it possible to use same code for UCF - CRCV dataset ? HOT 4
- How to make inference on new video or image using trained model ? HOT 2
- pretrain model HOT 1
- Trying to add aug_transforms to get_action_dataloaders HOT 1
- Error when training HOT 3
- Possible to train in MultiGPU (using DataParallel)? HOT 2
- explaining ImageTupletfm HOT 4
- RuntimeError: stack expects a non-empty TensorList HOT 4
- This appears to be an CNN-LSTM and not a ConvLSTM HOT 2
- Instructions to run baseline model HOT 1
- get_action_dataloaders() got an unexpected keyword argument 'device' HOT 2
- FileNotFoundError: [Errno 2] File /content/drive/My Drive/data/ucfTrainTestlist/testlist01.txt does not exist: HOT 2
- Videos with different number of frames HOT 1
- AssertionError HOT 2
- How to check test accuracy? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action_recognition.